@@ -16,10 +16,6 @@ class Response(object):
1616 meta (dict): The metadata from an API call
1717 response_data (dict or array<dict>): The response elements from an
1818 API call
19-
20- Attributes:
21- * (*): All keys in `attrs` will be exposed as attributes of an instance
22-
2319 '''
2420
2521 classPrefix = 'class pybutton.Response'
@@ -29,21 +25,27 @@ def __init__(self, meta, response_data):
2925 self .response_data = response_data
3026
3127 def data (self ):
32- '''Return the raw response element(s) received from the server.
33- May be a single dict or an array of dicts.
3428 '''
29+ Return the raw response element(s) received from the server.
30+ May be a single dict or an array of dicts.
31+ '''
32+
3533 return self .response_data
3634
3735 def next_cursor (self ):
38- '''For paginated responses, returns the url used to fetch
39- the next elements.
4036 '''
37+ For paginated responses, returns the url used to fetch
38+ the next elements.
39+ '''
40+
4141 return self ._format_cursor (self .meta .get ('next' ))
4242
4343 def prev_cursor (self ):
44- '''For paginated responses, returns the url used to fetch
45- the previous elements.
4644 '''
45+ For paginated responses, returns the url used to fetch
46+ the previous elements.
47+ '''
48+
4749 return self ._format_cursor (self .meta .get ('prev' ))
4850
4951 def __repr__ (self ):
@@ -60,8 +62,8 @@ def __repr__(self):
6062 Response .classPrefix ,
6163 len (self .response_data )
6264 )
63- else :
64- return '<class pybutton.Response>'
65+
66+ return '<class pybutton.Response>'
6567
6668 def _format_cursor (self , cursor_url ):
6769 if cursor_url :
0 commit comments