Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pwntus/python-jodel
Unofficial Jodel client written in Python.
https://github.com/pwntus/python-jodel
Last synced: 5 days ago
JSON representation
Unofficial Jodel client written in Python.
- Host: GitHub
- URL: https://github.com/pwntus/python-jodel
- Owner: Pwntus
- Created: 2016-09-14T21:00:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-16T22:54:30.000Z (over 8 years ago)
- Last Synced: 2024-12-15T19:05:37.223Z (7 days ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-jodel
_Requires Python >= 3.1_Unofficial [Jodel](https://jodel-app.com/) client written in Python.
The client will work _"out of the box"_, meaning that you do not need to find your own access token!
Every API request will also check if the access token has expired and update it if necessary.During client initialization a configuration file `pj_config` is either read or written with the current configuration for the client.
The client will re-use this configuration if it exists.## Usage
```python
>>> import python_jodel
>>> location = {lat = 78.089409, lng = 15.525395, city = 'Svalbard'}>>> client = python_jodel.Client(location)
>>> # Setting / changing the location after initialization
>>> client.set_location({lat = 60.165998, lng = 24.939687, city = 'Helsinki', country = 'Finland', name = 'Helsinki'})
```## Client methods
Every call will return a (HTTP status code, response text) tuple.```python
>>> client.set_location({location['lat'], location['lng'], location['city'], country = None, name = None})
>>> client.post(message = None, color = None)
>>> client.delete_post(post_id)
>>> client.get_posts_recent(skip = None, limit = 60, mine = False, after = None)
>>> client.get_posts_discussed(skip = None, limit = 60, mine = False, after = None)
>>> client.get_posts_popular(skip = None, limit = 60, mine = False, after = None)
>>> client.get_post(post_id)
>>> client.vote_up(post_id)
>>> client.vote_down(post_id)
>>> client.get_karma()
>>> client.get_user()
```