Difference between revisions of "API"
(13 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
==Accessing the API== | ==Accessing the API== | ||
− | Naviagte to '''Admin -> Settings -> API'''. There, you can find the URL and the API key. Please be '''careful''' with the key, because it | + | Naviagte to '''Admin -> Settings -> API'''. There, you can find the URL and the API key. Please be '''careful''' with the key, because it allows full access to the system. |
− | The base URL | + | |
+ | The base URL has the following (GET) parameters: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 14: | Line 15: | ||
==API Pages== | ==API Pages== | ||
+ | Here you can find the API pages. Arrays are returned in JSON. | ||
+ | ===donations=== | ||
+ | {| class="wikitable" | ||
+ | !colspan="2"|Required Paramters | ||
+ | |- | ||
+ | |'''action''' | ||
+ | |The action you want to run | ||
+ | |- | ||
+ | !colspan="2"|Available Actions | ||
+ | |- | ||
+ | |'''goal''' | ||
+ | |Returns Array(total, goal) | ||
+ | |- | ||
+ | |'''currency''' | ||
+ | |Returns Array(code, symbol) | ||
+ | |- | ||
+ | |'''create''' | ||
+ | |Requires '''steamid_for''' (32/64), '''amount''', '''packageid''' | ||
+ | Optional: '''steamid_buyer''' (32/64), '''name_buyer''', '''transactionid''', '''email''', '''gateway''' (default "api"), '''runonetimerewads''' (0/1, default 0), '''notify''' (0/1, default 1) | ||
+ | |} | ||
+ | |||
+ | ===news=== | ||
+ | Returns Array(News1, News2, News3, ...) | ||
+ | |||
+ | ===packages=== | ||
+ | {| class="wikitable" | ||
+ | !colspan="2"|Required Paramters | ||
+ | |- | ||
+ | |'''action''' | ||
+ | |The action you want to run | ||
+ | |- | ||
+ | !colspan="2"|Available Actions | ||
+ | |- | ||
+ | |'''assign''' | ||
+ | |Requires '''steamid''' (32/64), '''packageid''' | ||
+ | Optional: '''donationid''', '''days''', '''runonetimerewads''' (0/1, default 1), '''notify''' (0/1, default 1) | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===timezone=== | ||
+ | No API Key required. | ||
+ | |||
+ | Returns the timezone offset. | ||
+ | |||
===user=== | ===user=== | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 23: | Line 68: | ||
|'''steamid''' | |'''steamid''' | ||
|The steamid64 or steamid32 of the user | |The steamid64 or steamid32 of the user | ||
− | | | + | |- |
− | |||
− | |||
!colspan="2"|Available Actions | !colspan="2"|Available Actions | ||
|- | |- | ||
Line 34: | Line 77: | ||
|'''getgroup''' | |'''getgroup''' | ||
|Requires '''bundle''' (id). | |Requires '''bundle''' (id). | ||
− | Returns the group of the | + | Returns the group of the user in the specified bundle. |
+ | |- | ||
+ | |'''unban''' | ||
+ | |Requires '''serverbundle''' (id). | ||
+ | Unbans all active bans of the user in the specified bundle. Set serverbundle to -1 to unban on all bundles. | ||
|} | |} |
Latest revision as of 11:57, 26 March 2021
This is the API documentation. Please note that the API is new and that there aren't many functions at the moment. More functions will come with future updates.
Accessing the API
Naviagte to Admin -> Settings -> API. There, you can find the URL and the API key. Please be careful with the key, because it allows full access to the system.
The base URL has the following (GET) parameters:
t | The target API page, see below |
key | The API key |
API Pages
Here you can find the API pages. Arrays are returned in JSON.
donations
Required Paramters | |
---|---|
action | The action you want to run |
Available Actions | |
goal | Returns Array(total, goal) |
currency | Returns Array(code, symbol) |
create | Requires steamid_for (32/64), amount, packageid
Optional: steamid_buyer (32/64), name_buyer, transactionid, email, gateway (default "api"), runonetimerewads (0/1, default 0), notify (0/1, default 1) |
news
Returns Array(News1, News2, News3, ...)
packages
Required Paramters | |
---|---|
action | The action you want to run |
Available Actions | |
assign | Requires steamid (32/64), packageid
Optional: donationid, days, runonetimerewads (0/1, default 1), notify (0/1, default 1) |
timezone
No API Key required.
Returns the timezone offset.
user
Required Paramters | |
---|---|
action | The action you want to run |
steamid | The steamid64 or steamid32 of the user |
Available Actions | |
setgroup | Requires groupname and bundle (id).
Sets the group of the user in the specified bundle. |
getgroup | Requires bundle (id).
Returns the group of the user in the specified bundle. |
unban | Requires serverbundle (id).
Unbans all active bans of the user in the specified bundle. Set serverbundle to -1 to unban on all bundles. |