Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Renamed published_only to publish when retrieving lists #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mautic/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_list(
limit=0,
order_by='',
order_by_dir='ASC',
published_only=False,
published=False,
minimal=False
):
"""
Expand All @@ -133,7 +133,7 @@ def get_list(
:param limit: int
:param order_by: str
:param order_by_dir: str
:param published_only: bool
:param published: bool
:param minimal: bool
:return: dict|str
"""
Expand All @@ -147,8 +147,8 @@ def get_list(
parameters['orderBy'] = order_by
if order_by_dir:
parameters['orderByDir'] = order_by_dir
if published_only:
parameters['publishedOnly'] = 'true'
if published:
parameters['published'] = 'true'
response = self._client.session.get(
self.endpoint_url, params=parameters
)
Expand All @@ -172,7 +172,7 @@ def get_published_list(
limit=limit,
order_by=order_by,
order_by_dir=order_by_dir,
published_only=True
published=True
)

def create(self, parameters):
Expand Down
2 changes: 1 addition & 1 deletion mautic/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_list(
limit=0,
order_by='',
order_by_dir='ASC',
published_only=False,
published=False,
minimal=False
):
return self.action_not_supported('get_list')
Expand Down