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.2.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.2.tar.gz.
File metadata
- Download URL: poaurk-0.1.2.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 |
b8aefef2148c971712369f79efd7f16986379f55eb2036c18204d2c16d42e8c2
|
|
| MD5 |
ac4461ca79cf5895da658a74c0e37bcd
|
|
| BLAKE2b-256 |
e3342ba3cb8ac3d109bd5b77f488ff4833914ebeab6c2d1e2f99aaaf47fb9025
|
File details
Details for the file poaurk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: poaurk-0.1.2-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 |
24f124d89bf5c5b3b7c2b97861bc05ac1aeae3993456721366604d765d1f7c3b
|
|
| MD5 |
8ae9015268220ee4154f61149a94b241
|
|
| BLAKE2b-256 |
4435a0f45d0a58a1351c5939ff90e1b59a3a554856da61915c705fdfc1a50c45
|