API Docs: Difference between revisions
Jump to navigation
Jump to search
Add /api/feature endpoint
(Add /api/feature endpoint) |
|||
Line 1,050: | Line 1,050: | ||
409: Duplicate (User is already a permanent VIP) | 409: Duplicate (User is already a permanent VIP) | ||
----- | |||
====='''POST''' <code>/api/feature</code>===== | |||
Add or remove user features | |||
'''Input''' (Request Body): | |||
<syntaxhighlight lang="ts"> | |||
{ | |||
userID: string, // User to add or remove features from | |||
adminUserID: string, // Local userID of existing VIP | |||
feature: int, // [4] | |||
enabled: boolean // default "true" Enable or disable feature | |||
} | |||
</syntaxhighlight> | |||
References: <ref name=":4">See [[Types]] for a full list of possible user features.</ref> | |||
'''Response''': | |||
<syntaxhighlight lang="ts"> | |||
{ | |||
Nothing (status code 200) | |||
} | |||
</syntaxhighlight> | |||
'''Error codes''': | |||
400: Bad Request (Your inputs are wrong/impossible or the feature does not exist) | |||
403: Unauthorized (You are not a VIP) | |||
----- | ----- | ||
===Admin Calls=== | ===Admin Calls=== |