mirror of
https://github.com/deesiigneer/pyspapi.git
synced 2026-04-20 12:35:26 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
39
.github/workflows/python-publish.yml
vendored
Normal file
39
.github/workflows/python-publish.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# This workflow will upload a Python Package using Twine when a release is created
|
||||||
|
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
||||||
|
|
||||||
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
|
# They are provided by a third-party and are governed by
|
||||||
|
# separate terms of service, privacy policy, and support
|
||||||
|
# documentation.
|
||||||
|
|
||||||
|
name: Upload to PYPI
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install build
|
||||||
|
- name: Build package
|
||||||
|
run: python -m build
|
||||||
|
- name: Publish package
|
||||||
|
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
20
README.md
20
README.md
@@ -1,20 +1,20 @@
|
|||||||
#pyspapi
|
# pyspapi
|
||||||
Фреймворк [API](https://github.com/sp-worlds/api-docs) для серверов СП
|
Фреймворк [API](https://github.com/sp-worlds/api-docs) для серверов СП
|
||||||
|
|
||||||
##Установка
|
## Установка
|
||||||
**Требуется *Python 3.7* или выше**
|
**Требуется *Python 3.7* или выше**
|
||||||
|
|
||||||
*Windows*
|
*Windows*
|
||||||
```commandline
|
```commandline
|
||||||
> pip install pyspapi
|
pip install pyspapi
|
||||||
```
|
```
|
||||||
*Linux*
|
*Linux*
|
||||||
```commandline
|
```commandline
|
||||||
$ sudo apt pip3 install pyspapi
|
sudo apt pip3 install pyspapi
|
||||||
```
|
```
|
||||||
|
|
||||||
##Примеры
|
## Примеры
|
||||||
###Оплата
|
### [Оплата](https://github.com/sp-worlds/api-docs/blob/main/PAYMENTS.md)
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
import spapi
|
import spapi
|
||||||
@@ -33,8 +33,8 @@ print(api.payment(amount=1,
|
|||||||
- `amount` - Стоимость покупки в АРах
|
- `amount` - Стоимость покупки в АРах
|
||||||
- `redirectUrl` - URL страницы, на которую попадет пользователь после оплаты
|
- `redirectUrl` - URL страницы, на которую попадет пользователь после оплаты
|
||||||
- `webhookUrl` - URL, куда наш сервер направит запрос, чтобы оповестить ваш сервер об успешной оплате
|
- `webhookUrl` - URL, куда наш сервер направит запрос, чтобы оповестить ваш сервер об успешной оплате
|
||||||
- `data` - Строка до 100 символов, сюда можно пометить любые полезные данных.
|
- `data` - Строка до 100 символов, сюда можно поместить любые полезные данных.
|
||||||
####Получение данных об успешной оплате
|
#### Получение данных об успешной оплате
|
||||||
После успешной оплаты на URL указанный в `webhookUrl` придет POST запрос.
|
После успешной оплаты на URL указанный в `webhookUrl` придет POST запрос.
|
||||||
|
|
||||||
*Тело запроса будет в формате JSON:*
|
*Тело запроса будет в формате JSON:*
|
||||||
@@ -43,7 +43,7 @@ print(api.payment(amount=1,
|
|||||||
- `amount` - Стоимость покупки
|
- `amount` - Стоимость покупки
|
||||||
- `data` - Данные, которые вы отдали при создании запроса на оплату
|
- `data` - Данные, которые вы отдали при создании запроса на оплату
|
||||||
|
|
||||||
###Переводы
|
### [Переводы](https://github.com/sp-worlds/api-docs/blob/main/TRANSACTIONS.md)
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
import spapi
|
import spapi
|
||||||
@@ -62,7 +62,7 @@ print(api.transaction(receiver='12345',
|
|||||||
- `amount` - Количество АР для перевода
|
- `amount` - Количество АР для перевода
|
||||||
- `comment` - Комментарий к переводу
|
- `comment` - Комментарий к переводу
|
||||||
-
|
-
|
||||||
###Проверка наличия проходки
|
### [Проверка наличия проходки](https://github.com/sp-worlds/api-docs/blob/main/USERS.md)
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
import spapi
|
import spapi
|
||||||
|
|||||||
Reference in New Issue
Block a user