pychan/README.md

24 lines
584 B
Markdown
Raw Normal View History

2023-09-16 18:07:53 +00:00
# pychan
Python package for interacting with the [4chan JSON API](https://github.com/4chan/4chan-API).
## Usage
```python
from pychan.api import ChanAPI
api = ChanAPI()
# Get list of boards
boards = api.get_boards()
# Get catalog pages for a board
pol_catalog = api.get_catalog('po')
# Get high level stats for threads on a board
pol_threads = api.get_threads('po')
# Get a thread by thread number
thread = api.get_thread('po', 570368)
```
## Notes
Object classes such as Board, Thread, and Post are in development and can be imported from [pychan/models.py](pychan/models.py).