This tutoriall exposes key features of this library through mainly code examples. For in-depth description of the modules, you’ll want to read the API documentation.
If you have not installed python-restclient yet, the installation docs will get you started.
Usage example, get friendpaste page :
from restclient import Resource
res = Resource('http://friendpaste.com')
page = res.get()
Usage example, get friendpaste page :
from restclient import RestClient
client = RestClient()
page = resource.request('GET', 'http://friendpaste.com')
Or get a paste in JSON :
from restclient import RestClient
client = RestClient()
client.make_request('GET',
'http://friendpaste.com/5rOqE9XTz7lccLgZoQS4IP'),
headers={'Accept': 'application/json'})