Skip to content

Commit 1d9253d

Browse files
nksprzakanguenot
authored andcommitted
Add Wiki links to README and usage (#22)
1 parent bb5dac0 commit 1d9253d

File tree

2 files changed

+7
-42
lines changed

2 files changed

+7
-42
lines changed

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ Check out the latest development version anonymously with::
4545
$ git clone https://github.com/ilanddev/python-sdk.git
4646
$ cd python-sdk
4747

48+
============
49+
Documentation
50+
============
51+
52+
For documentation on using iland's Python SDK check out our `Wiki <https://github.com/ilanddev/python-sdk/wiki>`_.
53+
4854
============
4955
Installation
5056
============

docs/usage.rst

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,4 @@
22
Usage
33
=====
44

5-
To use iland-sdk in a project::
6-
7-
import iland
8-
9-
The API is exposed via the ``iland.Api`` class.
10-
11-
To create an instance of the ``iland.Api``::
12-
13-
>>> import iland
14-
>>> api = iland.Api(client_id=CLIENT_ID,
15-
client_secret=CLIENT_SECRET,
16-
username=USERNAME,
17-
password=PASSWORD)
18-
19-
You can then perform GET, PUT, POST and DELETE requests against the iland
20-
cloud::
21-
22-
>>> user = api.get('/user/' + USERNAME)
23-
>>> user.get('name'))
24-
USERNAME
25-
26-
>>> user_alert_emails = {'emails': ['test@iland.com', 'test2@iland.com'],
27-
'username': USERNAME}
28-
>>> api.post('/user/' + USERNAME + '/alert-emails', user_alert_emails)
29-
30-
To use a proxy you can define a ``python-requests`` style proxies_ dictionary
31-
and set the ``_proxies`` attribute on the api object::
32-
33-
>>> api = iland.Api(client_id=CLIENT_ID,
34-
client_secret=CLIENT_SECRET,
35-
username=USERNAME,
36-
password=PASSWORD)
37-
>>> api._proxies = {'https': 'https://10.10.1.10:3128'}
38-
>>> user = api.get('/user/' + USERNAME)
39-
40-
The ``get``, ``post``, ``put``, and ``delete`` methods can accept an optional
41-
``_timeout`` parameter that is passed to ``requests``::
42-
43-
>>> user = api.get('/user/' + USERNAME, timeout=5.0)
44-
45-
.. _proxies: http://docs.python-requests.org/en/master/user/advanced/#proxies
46-
.. _timeout: http://docs.python-requests.org/en/master/user/quickstart/#timeouts
5+
To get started using iland's Python SDK check out our `Wiki <https://github.com/ilanddev/python-sdk/wiki>`_.

0 commit comments

Comments
 (0)