Skip to content

Commit f4a4b1b

Browse files
committed
Document SDK in the readme file
1 parent 501ee44 commit f4a4b1b

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Python Loading SDK
2+
3+
## Usage Examples
4+
5+
Instantiate the client and optionally provide login credentials to be able to use methods that requires the user to be logged in.
6+
7+
```python
8+
from loading_sdk import LoadingApiClient
9+
10+
client = LoadingApiClient(email="your@email.com", password="your_password")
11+
```
12+
13+
### Requires Auth
14+
15+
```python
16+
response = client.get_profile()
17+
```
18+
19+
```python
20+
response = client.create_post(thread_id="5bbb986af1deda001d33bc4b", message="My message!")
21+
```
22+
23+
```python
24+
response = client.edit_post(post_id="5bc876dd70a79c001dab7ebe", message="My updated message!")
25+
```
26+
27+
```python
28+
response = client.create_thread(title="My title", message="The content!", category_name="games")
29+
```
30+
31+
```python
32+
response = client.edit_thread(post_id="5bbb986af1deda001d33bc4b", message="My updated message!")
33+
```
34+
35+
### Anonymous
36+
37+
```python
38+
response = client.search(query="search query")
39+
```
40+
41+
```python
42+
response = client.get_post(post_id="5bc876dd70a79c001dab7ebe")
43+
```
44+
45+
```python
46+
response = client.get_thread(thread_id="5bbb986af1deda001d33bc4b", page=3)
47+
```
48+
49+
```python
50+
response = client.get_games(page=5)
51+
```
52+
53+
```python
54+
response = client.get_other(page=7)
55+
```
56+
57+
```python
58+
response = client.get_editorials(page=2, post_type="review", sort="title")
59+
```

0 commit comments

Comments
 (0)