You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-19Lines changed: 39 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,46 @@
2
2
Simple, lightweight and scalable Python API wrapper for the Cisco Spark APIs
3
3
4
4
## Overview
5
-
A single Pythonic wrapper class representing the Cisco Spark API interfaces and returned JSON objects as method calls that return native Python objects.
5
+
Provides single Pythonic wrapper class that represents the Cisco Spark API interfaces and returned JSON objects as native Python objects.
6
6
7
+
* Supports Python versions 2 and 3.
8
+
7
9
* Leverages generator containers and RFC5988 web linking to provide simple and efficient 'paging' of Cisco Spark data objects returned by the Cisco Spark clout.
8
10
9
11
* All Cisco Spark JSON objects and attributes are represented as native python objects.
10
12
* As new Cisco Spark attributes are added and returned by the Spark cloud service, they will be automatically available in the respective Python objects - no library update required.
11
13
* New object types can be quickly created and modeled by via the generic SparkData class, or you can easily subclass SparkData to provide additional functionality.
12
14
13
-
* The CiscoSparkAPI class facilitates the creation of simple 'connection objects' that are associated with the access_token used to create the object. All API calls are wrapped by this single class, and are available via a simple hierarchical structure - like api.rooms.list().
14
-
* API defaults are provided to make getting connected simple, and can be easily overridden if needed.
15
-
* The only setting required to get connected is your Cisco Spark Access Token (see [developer.ciscospark.com](https://developer.ciscospark.com/getting-started.html)).
15
+
* The CiscoSparkAPI class facilitates the creation of simple 'connection objects.' All API calls are wrapped by this single class, and are available via a simple hierarchical structure - like CiscoSparkAPI.rooms.list().
16
+
* Argument defaults are provided to make getting connected simple, and can be easily overridden if needed.
17
+
* The only setting required to get connected is your Cisco Spark Access Token (see [developer.ciscospark.com](https://developer.ciscospark.com/getting-started.html)). When creating a new CiscoSparkAPI object, you may provide your access token one of two ways:
18
+
1. By setting a SPARK_ACCESS_TOKEN environment variable.
19
+
2. Via the ```CiscoSparkAPI(access_token="")``` argument.
16
20
* All API calls are provided as simple method calls on the API connection objects.
17
21
18
-
### Examples
22
+
23
+
## Installation
24
+
ciscosparkapi is available on PyPI. Install it via PIP, or alternatively you can download the package from GitHub and install it via setuptools.
# By default retrieves your access token from the SPARK_ACCESS_TOKEN environement variable
44
+
api = CiscoSparkAPI()
27
45
28
46
29
47
rooms = api.rooms.list() # Returns an generator container providing support for RFC5988 paging
@@ -32,22 +50,24 @@ for room in rooms: # Efficiently iterates through returned objects
32
50
33
51
34
52
# Creating a list from the returned generator containers is easy
35
-
team_list =list(api.teams.list())
36
-
print team_list
53
+
teams = api.teams.list()
54
+
team_list =list(teams)
55
+
print teams_list
37
56
```
38
57
39
58
40
-
## Community Development Project Information
41
-
This is a collaborative community development project to create two packages to be published to the Python Package Index:
59
+
## Current Status
60
+
**Beta(s) Released!**
42
61
43
-
1.[**ciscosparkapi**](https://github.com/CiscoDevNet/ciscosparkapi) - A simple, scalable and lightweight API wrapper for the Cisco Spark services APIs
44
-
2.[**ciscosparksdk**](https://github.com/CiscoDevNet/ciscosparksdk) - Additional features and functionality useful to Cisco Spark API developers
62
+
Please check the [releases page](https://github.com/CiscoDevNet/ciscosparkapi/releases) for details on the latest releases.
45
63
46
-
All are welcome to contribute to this project. Information on contributing this project can be found [here in the project Charter](https://github.com/CiscoDevNet/spark-python-packages-team/blob/master/Charter.md).
64
+
We have released the first beta distributions for this package! Please test out the package for your use cases, and raise [issues](https://github.com/CiscoDevNet/ciscosparkapi/issues) for any problems you encounter. Also, **PLEASE** create new [issues](https://github.com/CiscoDevNet/ciscosparkapi/issues) to provide any feedback on the package API structure (names, method calls and etc.). The package APIs are still subject to change, and we would like to get these nailed down before we release v1 for the package.
47
65
48
-
## Current Status
49
-
**Wrappers for all Cisco API endpoints and data objects have now been completed!**
50
66
67
+
## Community Development Project Information
68
+
This is a collaborative community development project working to create two packages to be published to the Python Package Index:
69
+
70
+
1.[**ciscosparkapi**](https://github.com/CiscoDevNet/ciscosparkapi) - Simple, lightweight and scalable Python API wrapper for the Cisco Spark APIs
71
+
2.[**ciscosparksdk**](https://github.com/CiscoDevNet/ciscosparksdk) - Additional features and functionality useful to developers building on Cisco Spark API
51
72
52
-
_Beta release imminent._
53
-
We are preparing to release the first _beta_ for this package. Please test out the package for your use cases, and raise issues for any problems you encounter. Also, **PLEASE** create new issues to provide feedback and foster discussion on the package API structure (names, method calls and etc.). The package APIs are still subject to change, and I would like to get these nailed down before we release v1 for the package.
73
+
Contributions and feedback are welcome. Information on contributing this project can be found [here in the project Charter](https://github.com/CiscoDevNet/spark-python-packages-team/blob/master/Charter.md).
0 commit comments