2021-01-31 19:27:25 +01:00
# Welcome to the Python-Spam-Protection-API wiki!
2021-01-02 19:17:10 +01:00
2021-01-31 19:42:24 +01:00
This library handles All Requests done to https://api.intellivoid.net/spamprotection/v1/lookup. To understand how this is meant to be used, please read the following [Documentation ](https://github.com/intellivoid/Python-Spam-Protection-API/blob/master/docs.md )
2021-01-02 19:17:10 +01:00
## Getting Started
- Installing the library:
2021-01-03 02:11:09 +01:00
`pip install Intellivoid-SPB`
2021-01-02 19:17:10 +01:00
- For those who wants to try out Development Builds:
2021-01-31 19:42:24 +01:00
`pip install git+https://github.com/intellivoid/Python-Spam-Protection-API`
2021-01-02 19:17:10 +01:00
## Usage
```
from spamprotection import SPBClient
import asyncio
2021-01-31 19:42:24 +01:00
loop = asyncio.get_event_loop() # asyncio loop
client = SPBClient() # spamprotection client
2021-01-02 19:17:10 +01:00
2021-01-31 19:42:24 +01:00
async def main(): # the main function to run in async loop
2021-01-02 19:17:10 +01:00
user = input("Enter a Username or UserID to check Spam Prediction on SPB: ")
status = await client.check_blacklist(user)
if status.success:
2021-01-02 20:13:47 +01:00
print(status.private_telegram_id)
2021-01-02 19:17:10 +01:00
else:
print("Polish Cow did not Approve this!")
if __name__ == "__main__":
loop.run_until_complete(main())
loop.close()
2021-01-02 19:20:54 +01:00
```
## Examples
2021-01-31 19:42:24 +01:00
All Detailed Examples are in [Examples Directory ](https://github.com/intellivoid/Python-Spam-Protection-API/tree/master/examples )