Python Package
Our python package is designed to allow you to interact with the RankGun API via python.
Getting Started
Installation
You can download the package using pip:
Simple Example
At the beginning of each RankGun application is the client. The client represents your workspace, to intializae a client import it from the Rankgun package:
The client requires an API token & Workspace Id.
Error Handling
The RankGun Module also handles documented errors.
All of the methods raise an exception when a documented error occurs, when an undocumented error occurs a HttpError will be raised. Here is an example of us using exception handling:
Code Reference
The full reference for our rankgun
package.
Client
The class behind everything.
Parameter | Description | Type |
---|---|---|
api_token | A Workspace's API token | String |
workspace_id | A Workspace's ID | String |
Code Sample:
Methods
promote
Promotes a user one rank higher in the group.
Parameter | Description | Type |
---|---|---|
user_id | Roblox User ID | Int |
Code Sample:
demote
Demotes a user one rank lower in the group.
Parameter | Description | Type |
---|---|---|
user_id | Roblox User ID | Int |
Code Sample:
setRank
Sets the rank of a user to a specific level.
Parameter | Description | Type |
---|---|---|
user_id | Roblox User ID | Int |
rank | Target Roblox Rank | Int |
Code Sample:
Contributions
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions
Report Bugs
Report bugs at https://github.com/rankgun/python/issues
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Fix Bugs
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it.
Implement Features
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
Write Documentation
rankgun could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
Submit Feedback
The best way to send feedback is to file an issue at https://github.com/rankgun/python/issues.
If you are proposing a new feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)