Skip to content
Merged
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
17 changes: 8 additions & 9 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,23 @@ def get_page_space(self, page_id):
"""
return ((self.get_page_by_id(page_id, expand='space') or {}).get('space') or {}).get('key')

def get_page_by_title(self, space, title, start=None, limit=None):
def get_page_by_title(self, space, title, expand=None):
"""
Returns the list of labels on a piece of Content.
:param space: Space key
:param title: Title of the page
:param start: OPTIONAL: The start point of the collection to return. Default: None (0).
:param limit: OPTIONAL: The limit of the number of labels to return, this may be restricted by
fixed system limits. Default: 200.
:param expand: OPTIONAL: expand e.g. history
:return: The JSON data returned from searched results the content endpoint, or the results of the
callback. Will raise requests.HTTPError on bad input, potentially.
If it has IndexError then return the None.
"""
url = 'rest/api/content'
params = {}
if start is not None:
params['start'] = int(start)
if limit is not None:
params['limit'] = int(limit)
params = {
'start': '0',
'limit': '1'
}
if expand is not None:
params['expand'] = expand
if space is not None:
params['spaceKey'] = str(space)
if space is not None:
Expand Down