Skip to content

Commit 1630ce1

Browse files
committed
Update docstrings
1 parent 3b66234 commit 1630ce1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ciscosparkapi/sparkdata.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"""SparkData base-class; models Spark JSON objects as native Python objects.
33
44
The SparkData class models any JSON object passed to it as a string or Python
5-
dictionary as a native Python object; providing attribute access access using
6-
native object.attribute syntax.
5+
dictionary as a native Python object; providing attribute access using native
6+
dot-syntax (`object.attribute`).
77
88
SparkData is intended to serve as a base-class, which provides inheritable
99
functionality, for concrete sub-classes that model specific Cisco Spark data
@@ -14,11 +14,11 @@
1414
to objects by the Cisco Spark cloud.
1515
1616
Example:
17-
>>> json_obj = '{"created": "2012-06-15T20:36:48.914Z",
18-
"displayName": "Chris Lunsford (chrlunsf)",
19-
"id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZm...",
20-
"avatar": "https://1efa7a94ed216783e352-c622665287144...",
21-
"emails": ["[email protected]"]}'
17+
>>> json_obj = '''{"created": "2012-06-15T20:36:48.914Z",
18+
"displayName": "Chris Lunsford (chrlunsf)",
19+
"id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1h...",
20+
"avatar": "https://1efa7a94ed216783e352-c6226652871...",
21+
"emails": ["[email protected]"]}'''
2222
>>> python_obj = SparkData(json_obj)
2323
>>> python_obj.displayName
2424
u'Chris Lunsford (chrlunsf)'
@@ -48,7 +48,7 @@
4848

4949

5050
def _json_dict(json):
51-
"""Given a JSON dictionary or string; return a dictionary.
51+
"""Given a dictionary or JSON string; return a dictionary.
5252
5353
Args:
5454
json(dict, str): Input JSON object.
@@ -74,7 +74,7 @@ class SparkData(object):
7474
"""Model Spark JSON objects as native Python objects."""
7575

7676
def __init__(self, json):
77-
"""Init a new SparkData object from a JSON dictionary or string.
77+
"""Init a new SparkData object from a dictionary or JSON string.
7878
7979
Args:
8080
json(dict, str): Input JSON object.
@@ -87,7 +87,7 @@ def __init__(self, json):
8787
self._json = _json_dict(json)
8888

8989
def __getattr__(self, item):
90-
"""Provide native attribute access to the JSON object's attributes.
90+
"""Provide native attribute access to the JSON object attributes.
9191
9292
This method is called when attempting to access a object attribute that
9393
hasn't been defined for the object. For example trying to access

0 commit comments

Comments
 (0)