Saidit API Wrapper


Keywords
Saidit, API, RSAW
License
GPL-3.0
Install
pip install rsaw==0.1.8

Documentation

RSAW

Raw Saidit API Wrapper

RSAW is a very light API wrapper, made for Saidit. It allows easier access to Saidit's API and its endpoints, returning a raw JSON result.

Current Version

RSAW is currently at version: 0.1.8

Installation

I suggest you install it with pip3

pip3 install rsaw

Rate Limits

Your requests will be sent as fast as possible, until the Saidit quota of 60 requests per minute is reached.

How to use

Using RSAW should be very easy. A full guide for beginners is located in the project's wiki. All you need to do is provide your credentials and an endpoint. Once you signup for API access via your account's app prefrences, you will be able to authenticate and send a GET request like this:

from rsaw import Saidit

saidit = Saidit(client_id='client_id',
                client_secret='client_secret',
                username='username',
                password='password',
                app='user_agent',
                token_file='/tmp/token')
usr_info = saidit.get('/api/v1/me')
print(usr_info)

Or to send a POST request:

from rsaw import Saidit

saidit = Saidit(client_id='client_id',
                client_secret='client_secret',
                username='username',
                password='password',
                app='our_app',
                token_file='/tmp/token')
paramaters = {'kind': 'self', 'sr': 'rsaw', 'title': 'testing - title', 'text': 'testing - selftext'}
submit = saidit.post('/api/submit', params=paramaters)
print(submit)

This will submit a self post to /s/rsaw (the project's sub), with a title of "testing - title", and a selftext of "testing - selftext".

Additional Info

  • You can send GET, PUT, POST, DELETE, and REQUEST requests with RSAW
  • I'd prefer you ask all questions by submitting to /s/rsaw
  • Don't manipulate votes
  • Don't make dumb bots