Skip to main content

Python wrapper for Misskey API.

Project description

MisskeyAPI

Python wrapper for Miskkey API (WIP)

Sample usage:

from misskey.misskeyapi import MisskeyAPI

misskey = MisskeyAPI("https://your.misskey.instance")  

app_secret = misskey.app_create(
    app_name,
    description,
    permission,
    callbackUrl
    )  

response = misskey.auth_session_generate(app_secret)

if response.ok:

    token = response.json()['token']
    url = response.json()['url']
    input(f'open this url in your browser: {url} and accept it. Then press enter')

else:

    print(response)  

response = misskey.auth_session_userkey(app_secret, token)

if response.ok:

    token = response.json()['accessToken']

else:

    print(response.text) 

Store or write down in a safe place this last obtained token to further usage with any of the API endpoints that require it (param i(token)).

description Misskey API endpoint method params
i /api/i account_i i(token)
create app /api/app/create app_create name, description, permission, callbackUrl, session
show app /api/app/show app_show app_id, session
generate auth session /api/auth/session/generate auth_session_generate app_secret
show auth session /api/auth/session/show auth_session_show token
auth session userkey /api/auth/session/userkey auth_session_userkey app_secret, token
create note /api/notes/create notes_create i(token), visibility, text, local_only
create group /api/users/groups/create users_groups_create i(token), groupId
delete group /api/users/groups/delete users_groups_delete i(token), groupId

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

MisskeyAPI-0.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

MisskeyAPI-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file MisskeyAPI-0.1.0.tar.gz.

File metadata

  • Download URL: MisskeyAPI-0.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for MisskeyAPI-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0dff6183f768067651e917ee87f953af795d1cf180648dc4a125f3bb913dc1f9
MD5 e7f2d98ab0385834e1e3ec8f6583bcd1
BLAKE2b-256 82cc4cb5e97166cde6285ca508973ac670a3859687d4b724f7ec638c73982dc4

See more details on using hashes here.

File details

Details for the file MisskeyAPI-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: MisskeyAPI-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for MisskeyAPI-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daec845b3f05056ea3c3150c1d5c305c253fa3db6a8029a4d89129f68a2ee9cb
MD5 474918410f171d6fcca9845e24e62d84
BLAKE2b-256 4639ee1229e69989ebcda3c332ca9ac4b852d776c36ada995ce7d170e87c609d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page