Group Endpoints
Group endpoints in RoManager's API
Base URL: https://api.romanager.bot/v1
Assign a role to a group member
PATCH /role/:userId
Only one of these parameters are required
Parameter | Type | Description |
---|---|---|
roleId | number | ID of role to assign |
roleRank | number | Rank of role to assign |
roleName | string | Name of role to assign |
Request body example
{
"roleRank": 254
}
HttpService example
-- This example assigns the role with the rank 254 to the user RoManager_Bot (1823986679)
local http = game:GetService('HttpService')
http:RequestAsync({
Url = 'https://api.romanager.bot/v1/role/1823986679',
Body = http:JSONEncode({
roleRank = 254
}),
Method = 'PATCH',
Headers = {
['Content-Type'] = 'application/json',
['Authorization'] = 'API key here'
}
})
Exile a group member
DELETE /exile/:userId
HttpService example
-- This example exiles the user RoManager_Bot (id 1823986679)
local http = game:GetService('HttpService')
http:RequestAsync({
Url = 'https://api.romanager.bot/v1/exile/1823986679',
Method = 'DELETE',
Headers = {
['Content-Type'] = 'application/json',
['Authorization'] = 'API key here'
}
})
Set the group shout
PATCH /shout
Parameter | Type | Description |
---|---|---|
content | string | The new shout's content |
Request body example
{
"content": "This is what will be set as the new shout!"
}
HttpService example
-- This example sets the shout to "This is what will be set as the new shout!"
local http = game:GetService('HttpService')
http:RequestAsync({
Url = 'https://api.romanager.bot/v1/shout',
Method = 'PATCH',
Body = http:JSONEncode({
content = 'This is what will be set as the new shout!'
}),
Headers = {
['Content-Type'] = 'application/json',
['Authorization'] = 'API key here'
}
})