Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

joshuaavalon/python-plurk-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plurk API

PyPi

This provides a simple OAuth wrapper for Plurk 2.0 API. Note that this is NOT a full wrapper of the API.

Getting Started

Register your app

  1. Register your app here or manage your apps here.
  2. Copy your app key and app secret.

Install library

pip install plurk-api

Get user access token

from plurk_api import PlurkOAuthApi


api = PlurkOAuthApi("<App Key>", "<App Sercet>")
request_token = api.request_token()
authorization_url = api.authorization_url(request_token)

# Let the user give you back the verifier

access_token = api.access_token(request_token, "<verifier>")

Access API

from plurk_api import PlurkApi


api = PlurkApi("<App Key>", "<App Sercet>", access_token["oauth_token"], access_token["oauth_token_secret"])
response = api.request("/APP/Profile/getPublicProfile", {"user_id": 12345})

API Documentation

Documentation is available here.