-
Notifications
You must be signed in to change notification settings - Fork 3
Switches
greysdawn edited this page Nov 17, 2021
·
2 revisions
Switches can't be instantiated directly; see the API page for getting them
Note: These are also used for fronters
key | type | notes |
---|---|---|
id | string (UUID) | only available with v2 |
timestamp | Date | |
members | Array<string>|Map<Member> | only contains member IDS if getting raw switches |
Note: While some token arguments are marked as not optional, if the API instance has a token attached then it can be omitted
Patches the switch's timestamp
Arguments
name | description | optional? |
---|---|---|
timestamp | A valid Date object | no |
token | A token to auth the request | no |
Returns
The updated Switch object
Errors
Throws for the following:
- Token invalid
- Timestamp invalid
Patches the switch's members
Arguments
name | description | optional? |
---|---|---|
token | A token to auth the request | no |
members | Array of member IDs | yes (patches empty array if not provided) |
Returns
The updated Switch object
Errors
Throws for the following:
- Token invalid
- Member ID(s) invalid
Deletes the switch
Arguments
name | description | optional? |
---|---|---|
token | A token to auth the request | no |
Returns
Nothing
Errors
Throws for the following:
- Token invalid
credit to xSke for Pluralkit