Hello everyone! So, i made the community made "plugin" for python to use functionality of the whitelists
WARNING: This is not a real plugin, you need to** install file with plugin first**! Also, this only supports username and password whitelists, but i will inplement this soon anyway (this means you cant add, remove, whitelist and blacklist people in hwid or ip whitelists)
Firstly, you need to install the file with class you need to use
- Download the file in github (yaris.py)
- Place it in your project directory
- Add this code to your main .py file: (you need )
import requests
from yaris import Yaris
yaris = Yaris()
yaris.set_public_key(***Your whitelist public key here***) #place your public whitelist key here
yaris.set_private_key(***Your whitelist private key here***) #place your private key here
To use "plugin", you need to install "requests" plugin. To do so, open the console in your code editor and write:
pip install requests
All commands from this message to other message, that says "End of private key requirement cmds" requires to have private key set up. (ohhh my bad english strikes again)
Almost every command can return json code, that you can use to get the info about the action
json = #command
print(json)
Our "plugin" has commands on how to use them. (you need the private key to use it)
This command will return your whitelist info Example:
print(yaris.get_wl_info())
it will give you something like this:
{'information': {'id': '1', 'owner': '76654', 'name': 'Test', 'description': 'yes', 'type': 'Username + Password'}}
To learn how to get the info from json you need to just put the json in variable and give computer the path
json = yaris.get_wl_info() #creating variable with json
print(json['information']['name'])# Will give the name of the whitelist.
print(json['information']['type']) # Will give the type of the whitelist.
# and etc.
This command will add a player to your whitelist (you need the private key to use it) Example:
yaris.add_user("Tetunus", "1111", "Developer")
This command will remove the player from your whitelist (again, you need the private key for it) Example:
yaris.remove_user("Tetunus")
This command will blacklist user (or just suspend) Example:
yaris.blacklist_user("Sidge", "Retard lol")
This command won't suspend or blacklist user from your services by itself. You need to use some code to set up (spoiler: just check the returned json from log_in(username, password) for blacklist part of json)
This command will basically whitelist user, so your service won't mark his as blacklisted and he will be able to use it Example:
yaris.whitelist_user("Sidge")
The name of the command explains itself Example:
yaris.add_user("Sidge", "1111", "Some dumb dude")
print(yaris.log_in("Sidge", "1111")) # Will give success json
print(yaris.log_in("Sidge", "1234")) # Will give an error since invalid password
You need to use a variable or print() to ensure if logging in is success or failure.