mirror of
https://github.com/deesiigneer/pyspapi.git
synced 2026-04-20 04:25:25 +00:00
new version
This commit is contained in:
48
docs/api.rst
48
docs/api.rst
@@ -1,4 +1,4 @@
|
||||
.. py:currentmodule:: pyspapi
|
||||
.. currentmodule:: pyspapi
|
||||
|
||||
API Reference
|
||||
===============
|
||||
@@ -25,50 +25,6 @@ There are two main ways to query version information.
|
||||
-----------
|
||||
|
||||
``SPAPI``
|
||||
~~~~~
|
||||
~~~~~~~~~
|
||||
.. autoclass:: SPAPI
|
||||
:members:
|
||||
|
||||
.. automethod:: SPAPI.event()
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.check_user_access
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_user
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_users
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.payment
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.transaction
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.webhook_verify
|
||||
:decorator:
|
||||
|
||||
MojangAPI
|
||||
~~~~~
|
||||
.. autoclass:: MojangAPI
|
||||
:members:
|
||||
|
||||
.. automethod:: SPAPI.event()
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_name_history
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_profile
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_username
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_uuid
|
||||
:decorator:
|
||||
|
||||
.. automethod:: SPAPI.get_uuids
|
||||
:decorator:
|
||||
|
||||
17
docs/conf.py
17
docs/conf.py
@@ -1,5 +1,7 @@
|
||||
from re import search, MULTILINE
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
project = 'pyspapi'
|
||||
copyright = '2022, deesiigneer'
|
||||
@@ -17,6 +19,9 @@ release = version
|
||||
|
||||
# -- General configuration
|
||||
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.duration',
|
||||
'sphinx.ext.doctest',
|
||||
@@ -25,6 +30,9 @@ extensions = [
|
||||
'sphinx.ext.intersphinx',
|
||||
]
|
||||
|
||||
autodoc_member_order = "bysource"
|
||||
autodoc_typehinta = "none"
|
||||
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/3/', None),
|
||||
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
|
||||
@@ -34,7 +42,7 @@ version_match = os.environ.get("READTHEDOCS_VERSION")
|
||||
json_url = f"https://pyspapi.readthedocs.io/ru/{version_match}/_static/switcher.json"
|
||||
|
||||
intersphinx_disabled_domains = ['std']
|
||||
language = None
|
||||
language = 'en'
|
||||
locale_dirs = ["locale/"]
|
||||
exclude_patterns = []
|
||||
html_static_path = ["_static"]
|
||||
@@ -70,12 +78,7 @@ html_theme_options = {
|
||||
],
|
||||
"header_links_before_dropdown": 4,
|
||||
"show_toc_level": 1,
|
||||
"navbar_start": ["navbar-logo", "version-switcher"],
|
||||
"switcher": {
|
||||
"json_url": json_url,
|
||||
"version_match": version_match
|
||||
},
|
||||
"navbar_start": ["navbar-logo"],
|
||||
"navigation_with_keys": True,
|
||||
}
|
||||
html_css_files = ["custom.css"]
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Quickstart
|
||||
This page gives a brief introduction to the library.
|
||||
|
||||
Checking balance
|
||||
-------------
|
||||
----------------
|
||||
|
||||
Let's output the amount of money remaining in the card account to the console.
|
||||
|
||||
@@ -18,9 +18,17 @@ It looks something like this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import pyspapi
|
||||
from pyspapi import SPAPI
|
||||
from asyncio import get_event_loop
|
||||
|
||||
print(pyspapi.SPAPI(card_id='card_id', token='token').balance)
|
||||
spapi = SPAPI(card_id='CARD_ID', token='TOKEN')
|
||||
|
||||
|
||||
async def main():
|
||||
print(await spapi.balance)
|
||||
|
||||
loop = get_event_loop()
|
||||
loop.run_until_complete(main())
|
||||
|
||||
Make sure not to name it ``pyspapi`` as that'll conflict with the library.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user