Pointercrate Python API
pointercratepy is a library that provides its users ability to interact with the api of Pointercrate.
Explore the docs
Report Bug
|
Request Feature
Table of Contents
About the project
Built With
Getting Started
Installation
Windows
python -m pip install pointercratepy
Linux
python3 -m pip install pointercratepy
Usage
from pointercratepy import Client
client = Client()
Documentation
pointercratepy allows you searching and interacting with the demons of pointercrate ! You can also get information about the demons that are not in the list anymore.
Demons
function get_demons(**options)
Parameters:
- limit (Optional [int]) - The maximum amount of object to return. Must lie between 1 and 100 | Default is 50
- name (Optional [str]) - Filter with the name of the demon [!!!] Case sensitive [!!!]
- name_contains (Optional [str]) - Check if a demon has the specified string in his name, not case sensitive so it's a good alternative to name filter.
- after (Optional [int]) - Used for pagination, example below.
- before (Optional [int]) - Used for pagination, example below.
- verifier_id (Optional [int]) - Filter with the verifier's id.
- publisher_id (Optional [int]) - Filter with the publisher's id.
- publisher_name (Optional [str]) - Filter with the name of the player who uploaded the level. [!!!] Case sensitive [!!!]
- listed (Optional [bool]) - Sort the levels by their position in the list. | Default is True
Returns: All demons information.
Return type: List of objects
[
{
"id": 250,
"position": 1,
"name": "Tartarus",
"requirement": 47,
"video": "https://www.youtube.com/watch?v=9YYQBbrsV5Y",
"publisher": {
"id": 34134,
"name": "Dolphy",
"banned": false
},
"verifier": {
"id": 34134,
"name": "Dolphy",
"banned": false
},
"level_id": 59075347
},
{
"id": 274,
"position": 2,
"name": "The Golden",
"requirement": 50,
"video": "https://www.youtube.com/watch?v=Aas8_QKLnuc",
"publisher": {
"id": 35150,
"name": "BoBoBoBoBoBoBo",
"banned": false
},
"verifier": {
"id": 5240,
"name": "nSwish",
"banned": false
},
"level_id": 60978746
}
]
id
Type: int The ID of the object in the database.
position
Type: int The position of the demon in the list.
name
Type: str The name of the demon.
requirement
Type: int The requirement % to get your record accepted.
video
Type: str Link of the video of the level.
Object publisher: contains information about the player who uploaded the level
id
Type: int Player's ID.
name
Type: str Player's name.
banned
Type: bool If the player is banned from pointercrate or not.
Object verifier: contains information about the player who verified the level
id
Type: int Player's ID.
name
Type: str Player's name.
banned
Type: bool If the verifier is banned from pointercrate or not.
level_id
Type: int The ID of the demon.
Players
function get_players_ranked(**options)
Parameters:
- limit (Optional [int]) - The maximum amount of object to return. Must lie between 1 and 100 | Default is 50
- name (Optional [str]) - Filter with the name of the player [!!!] Case sensitive [!!!]
- name_contains (Optional [str]) - Check if a player has the specified string in his name, not case sensitive so it's a good alternative to name filter.
- nation (Optional [str]) - Filter with the nation of the player.
- after (Optional [int]) - Used for pagination, example below.
- before (Optional [int]) - Used for pagination, example below.
Returns: All player's information.
Return type: List of objects
[
{
"id": 34124,
"name": "Wolvez",
"rank": 1,
"score": 4466.7859672865025,
"nationality": {
"country_code": "SE",
"nation": "Sweden",
"subdivision": null
}
}
]
id
Type: int The ID of the player.
rank
Type: int The position of the player in the list.
score
Type: float The number of list points that the player has.
Object nationality: contains information about the location of the player
country_code
Type: str ISO country code.
nation
Type: str Nation's name.
subdivision
Type: str Subdivision of the nation.
Examples
from pointercratepy import Client
client = Client()
demons = client.get_demons(limit=3) # [{....}, {....}, {....}]
# List of 3 objects containing the top 3
# demonlist from march 2021
print(demons[0].get("name")) # Tartarus
print(demons[1].get("name")) # The Golden
print(demons[2].get("name")) # Zodiac
from pointercratepy import Client
client = Client()
demons = client.get_demons(name="Tartarus") # [{....}]
# List with one object containing information about the demon named Tartarus
demons = client.get_demons(name="tartarus") # [] Empty list
from pointercratepy import Client
client = Client()
demons = client.get_demons(name_contains="blade") # [{Edge of the Blade's info}, {Blade of Justice's info}....]
# List of levels containing "edge" in their name
demons = client.get_demons(name_contains="tartarus") # [{ "Tartarus's info "}]
# As you can see, it's not case sensitive so it can be a good alternative to "name"
from pointercratepy import Client
client = Client()
demons = client.get_demons(after=5, before=9) # [{...}, {...}]
# Demons which are at position 6, 7 and 8
demons = client.get_demons(limit=100) # [{...}, {...}, ...] List of top 100 demons
demons = client.get_demons(limit=100, after=100) # [{...}, {...}, ...] Demons between top 101 and 200
# Kugelblitz's id is 598
from pointercratepy import Client
client = Client()
demons = client.get_demons(verifier_id=598) # [{SARY NEVER CLEAR's info}]
# List of levels that Kugelblitz has verified
# Dolphy's id is 34134
from pointercratepy import Client
client = Client()
demons = client.get_demons(publisher_id=34134) # [{Tartarus's info}]
# List of levels that Dolphy has uploaded
from pointercratepy import Client
client = Client()
demons = client.get_demons(publisher_name="ViPriN") # [{...}, {...}, ...] Contains all levels uploaded by "ViPriN"
demons = client.get_demons(publisher_name="viprin") # [{}] No results because it's case sensitive
from pointercratepy import Client
client = Client()
demons = client.get_demons(listed=True) # default value, give the demons ordered by position
demons = client.get_demons(listed=False) # give the demons disorderly
from pointercratepy import Client
client = Client()
players = client.get_players_ranked(limit=2, nation="FR") # [{....}, {....}]
players = client.get_players_ranked(limit=2, nation="France") # [{....}, {....}]
# This will give the same results since you can filter both by country code and country name
# List of 2 objects containing the top 2 french players
# demonlist from june 2022
print(players[0].get("name")) # GDonut
print(players[1].get("name")) # Boodbdog
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learned, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Hikudo - @bretheskevin - bretheskevin@gmail.com
Discord - Hikudo#1714
Credits
Changelog [day/month/year]
0.0.1 < 1.0.0 (13/03/2021)
1.0.1 & 1.0.2 (13/03/2021)
1.1.0 (06/30/2022)
Project Link: https://github.com/bretheskevin/pointercrate.py
Metadata
Release files for pointercratepy 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pointercratepy-1.1.0.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pointercratepy-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / pointercratepy-1.1.0.tar.gz
| Download URL | pointercratepy-1.1.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
702ff823c56ad52e824b066d6dd0d27d30f0f84ac6b2a206f9011dd41fabed24
|
|
BLAKE2b-256 checksum How to use checksums |
e8d7c1322ae39ea66aa8b7160a490cc0b7fede6d8842a5d4896e6d06e58e514b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.4
|
Release files / pointercratepy-1.1.0-py3-none-any.whl
| Download URL | pointercratepy-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7577e7d2dd42490736e14cf028d5b3d0ae62d48419838606d424cfcbc0f9936
|
|
BLAKE2b-256 checksum How to use checksums |
04217b9d3026fc445094bd1855a10a07be689eb3aba7b0b6533b0bc8e46804cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.4
|