Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/littlebutt/arcapi
A Python API for Arc Prober.
https://github.com/littlebutt/arcapi
Last synced: about 1 month ago
JSON representation
A Python API for Arc Prober.
- Host: GitHub
- URL: https://github.com/littlebutt/arcapi
- Owner: littlebutt
- License: mit
- Created: 2020-09-04T23:45:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-05T12:14:59.000Z (over 4 years ago)
- Last Synced: 2024-08-09T16:17:27.661Z (5 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arcapi
A third-party API for [ARC Prober](https://redive.estertion.win/arcaea/probe/) in Python.
Language: English/[中文](docs/README-CN.md)/[日本語](docs/README-JP.md)
## Quick Start
### Install
To use Arcapi, you can install it by [pypi](https://pypi.org/).
```shell script
$pip install Arc-api
```### Usage
This api support synchronized and asynchronized methods to connect the websocket provide by Prober. To run in a synchronized way:```python
from Arcapi import SyncApi# Initialize an API with user code
api_ = SyncApi(user_code='000000000')# You can assign the constant range here, or just leave it in a default
print("userinfo: ", api_.userinfo(start=8, end=12))
```Otherwise, you can run in an asynchronized way. If you deploy your service with a bot, I strongly recommend you to do in this way:
```python
import asyncio
from Arcapi import AsyncApi# Initialize an API with user code
api_ = AsyncApi(user_code='000000000')# You can assign the constant range here, or just leave it in a default
asyncio.get_event_loop().run_until_complete(api_.userinfo(start=8, end=12))
```