Python Plurk Api
Project description
poaurk
Plurk + Oauth Library modify from the work by (clsung's version)[https://github.com/clsung/plurk-oauth].
Replace python-oauth library to requests-oauthlib.
Installation
pip install poaurk
Example
Authorize and get profile
# import package
from poaurk import (PlurkAPI, PlurkOAuth)
# Init a new plurk object
plurk = PlurkAPI("<consumer key>", "<consumer secret>")
# Authorize if no token
status, data = plurk.authorize()
if not status:
# Failed
print(data)
# Call api
status, data = plurk.callAPI('/APP/Profile/getOwnProfile') # status = True if successful
print(data)
Init from json file
Copy api.keys.example to yout project, modified it.
from poaurk import PlurkAPI
# Init
plurk = PlurkAPI.fromfile("api.keys")
# Get own profile
_, data = plurk.callAPI('/APP/Profile/getOwnProfile')
print(data)
# Get Public Profile from user_id
# User id can obtain from other api
_, data = plurk.callAPI('/APP/Profile/getPublicProfile', options={'user_id': '<user id>'})
print(data)
# Upload picture
_, data = plurk.callAPI('/APP/Timeline/uploadPicture', files={'image': '<image path>'})
print(data)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
poaurk-0.1.1.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poaurk-0.1.1.tar.gz.
File metadata
- Download URL: poaurk-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a103f8046161070e6c2ad36e8ca430ca679c9f1b3e5395db4cba9c595595c2f8
|
|
| MD5 |
8074f9d803db11ee2fe88f0f9e81002e
|
|
| BLAKE2b-256 |
2dc96cd392ae323d1451c1b31297b5f6b7c2e223b1b9a114fd976c85b0b1c07f
|
File details
Details for the file poaurk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: poaurk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ced13a8af5852840e05cfbff5520db2a9104641a4d7eda1a42d3538e12068d41
|
|
| MD5 |
a437deeb32dbd3ade7c080d1d480c9f0
|
|
| BLAKE2b-256 |
47fab0f0da7c2a324328dc01fe130a58a600fb7861402fb33c592ebd5b9c6620
|