|
1 | | -# Priority Matrix Python API |
2 | | -#Requirements |
| 1 | +==================================== |
| 2 | +Getting Started with Priority Matrix |
| 3 | +==================================== |
3 | 4 |
|
4 | | -Priority Matrix requires the following modules: |
5 | | - - Python 2.5+ |
6 | | - - Slumber |
7 | | - - Demjson |
8 | | - - Quick view of PM use |
9 | 5 |
|
10 | | -PM is easy to use to interact with the API: |
11 | | -test.py: |
| 6 | +Requirements |
| 7 | +============ |
| 8 | +Install dependencies: |
| 9 | +The API request processor library [Slumber](http://slumber.readthedocs.org/en/v0.6.0/) : |
| 10 | + |
| 11 | + `$ pip install slumber` |
| 12 | + |
| 13 | + |
| 14 | +The encoder and decoder Json library [Demjson](https://pypi.python.org/pypi/demjson) : |
| 15 | + |
| 16 | + `$ pip install demjson` |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +Installation |
| 21 | +============ |
| 22 | + |
| 23 | +There are two ways to install the extension. |
| 24 | +Using pip: |
| 25 | + |
| 26 | + `$ pip install priority_matrix` |
| 27 | + |
| 28 | +or download the package, and from the source tree: |
| 29 | + |
| 30 | + `$ [sudo] python setup.py install` |
| 31 | + |
| 32 | +Authentication and quick use |
| 33 | +=============== |
| 34 | + |
| 35 | +1. Priority Matrix API uses a the authentication OAuth 2.0. |
| 36 | + |
| 37 | + You need an access token to use the library. |
| 38 | + |
| 39 | + Please, follow the instructions of this tutorial to get the access token. |
| 40 | + |
| 41 | +2. Printing and modifying an item. |
| 42 | + |
| 43 | + test: |
12 | 44 |
|
13 | 45 | ``` |
14 | | -import priority_matrix |
| 46 | + import priority_matrix |
15 | 47 |
|
16 | | -pm = PM("https://sync.appfluence.com/api/v1/", "your_access_token") |
| 48 | + pm = PM("https://sync.appfluence.com/api/v1/", "your_access_token") |
17 | 49 |
|
18 | | -print pm.project("project_name").item("item_name").toString() |
19 | | -pm.project("project_name").item("item_name").name = "New item name" |
20 | | -print pm.project("project_name").item("item_name").name |
21 | | -print pm.project("project_name").item("item_name").id |
| 50 | + print pm.project("project_name").item("item_name").toString() |
| 51 | + pm.project("project_name").item("item_name").name = "New item name" |
| 52 | + print pm.project("project_name").item("item_name").name |
| 53 | + print pm.project("project_name").item("item_name").id |
22 | 54 | ``` |
0 commit comments