semvec/pypi-packages huggingface dataset:
raw 0.0.6
Ruqqus API Wrapper
Keywords: Ruqqus API RAW

RAW
===

**Ruqqus API Wrapper**

Lightweigt API wrapper, made for `Ruqqus <https://ruqqus.com>`_. Allows access to API endpoints and returns a JSON result.

Installation
------------

.. code-block:: bash

   pip3 install raw

How to use
----------

Sending a get request:

.. code-block:: python

    from raw import Ruqqus
    
    ruqqus = Ruqqus(client_id='client_id',
                    client_secret='client_secret',
                    user_agent='user_agent',
                    access_token='access_token',
                    refresh_token='refresh_token')
    comment = ruqqus.get('/api/v1/post/b8zg')
    print(comment)
    
Sending a post request:

.. code-block:: python

    from raw import Ruqqus
    
    ruqqus = Ruqqus(client_id=client_id,
                    client_secret=client_secret,
                    user_agent=user_agent,
                    access_token=access_token,
                    refresh_token=refresh_token)
    title = 'API TESTING'
    url = 'https://localhost:8000'
    parameters = {'board': 'general',
                  'title': title,
                  'url' : url}
    submit = ruqqus.post('/api/v1/submit', data=parameters)
    print(submit)

Archived because the Ruqqus admins can't get their shit together.