Skip to content

Commit bc24bcc

Browse files
committed
add some usage example to README
1 parent f1ec1b0 commit bc24bcc

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
11
# intercomic
2-
Tiny Intercom (https://intercom.io) REST API Client
2+
Tiny Client for the Intercom API (https://api.intercom.io/)
33

4+
## Installation
5+
6+
Will be soon at PYPI
7+
8+
## Basic Usage
9+
10+
### Configure your client
11+
12+
```python
13+
from intercomic import IntercomApp
14+
15+
intercom = IntercomApp(access_token='your-access-token')
16+
```
17+
18+
### Examples
19+
20+
#### Users
21+
22+
```python
23+
# Create a user
24+
import json
25+
user = intercom.users.create(json.dumps({'email': '[email protected]', 'name': 'John'}))
26+
# Find user by user_id
27+
user = intercom.users.get(filters={'user_id': 1})
28+
# Find user by email
29+
user = intercom.users.get(filters={'email': email})
30+
# Delete a user
31+
user = intercom.users.delete(filters={'user_id': 1})
32+
```

0 commit comments

Comments
 (0)