feat(apiv2): docs fixes
This commit is contained in:
parent
7d36a39a57
commit
8e0e393f52
@ -24,7 +24,7 @@ namespace PluralKit.API
|
|||||||
else return Ok(system.ToJson(this.ContextFor(system), v: APIVersion.V2));
|
else return Ok(system.ToJson(this.ContextFor(system), v: APIVersion.V2));
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPatch]
|
[HttpPatch("@me")]
|
||||||
public async Task<IActionResult> DoSystemPatch([FromBody] JObject data)
|
public async Task<IActionResult> DoSystemPatch([FromBody] JObject data)
|
||||||
{
|
{
|
||||||
var system = await ResolveSystem("@me");
|
var system = await ResolveSystem("@me");
|
||||||
|
@ -123,8 +123,8 @@ namespace PluralKit.Core
|
|||||||
o.Add("name", member.NameFor(ctx));
|
o.Add("name", member.NameFor(ctx));
|
||||||
|
|
||||||
// o.Add("color", member.ColorPrivacy.CanAccess(ctx) ? member.Color : null);
|
// o.Add("color", member.ColorPrivacy.CanAccess(ctx) ? member.Color : null);
|
||||||
o.Add("color", member.Color);
|
|
||||||
o.Add("display_name", member.NamePrivacy.CanAccess(ctx) ? member.DisplayName : null);
|
o.Add("display_name", member.NamePrivacy.CanAccess(ctx) ? member.DisplayName : null);
|
||||||
|
o.Add("color", member.Color);
|
||||||
o.Add("birthday", member.BirthdayFor(ctx)?.FormatExport());
|
o.Add("birthday", member.BirthdayFor(ctx)?.FormatExport());
|
||||||
o.Add("pronouns", member.PronounsFor(ctx));
|
o.Add("pronouns", member.PronounsFor(ctx));
|
||||||
o.Add("avatar_url", member.AvatarFor(ctx).TryGetCleanCdnUrl());
|
o.Add("avatar_url", member.AvatarFor(ctx).TryGetCleanCdnUrl());
|
||||||
|
@ -32,7 +32,7 @@ GET `/systems/@me/guilds/{guild_id}`
|
|||||||
|
|
||||||
Returns a [system guild settings](/api/models#system-guild-settings) object.
|
Returns a [system guild settings](/api/models#system-guild-settings) object.
|
||||||
|
|
||||||
::: note
|
::: tip
|
||||||
You must already have updated per-guild settings for your system in the target guild before being able to get or update them from the API.
|
You must already have updated per-guild settings for your system in the target guild before being able to get or update them from the API.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ GET `/members/{memberRef}/groups`
|
|||||||
|
|
||||||
PUT `/members/{memberRef}/groups`
|
PUT `/members/{memberRef}/groups`
|
||||||
|
|
||||||
::: warn
|
::: warning
|
||||||
Not all HTTP implementations support PUT requests with a body. If yours does not, consider using the [Add Member To Group](#add-member-to-group) endpoint instead.
|
Not all HTTP implementations support PUT requests with a body. If yours does not, consider using the [Add Member To Group](#add-member-to-group) endpoint instead.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Not all HTTP implementations support PUT requests with a body. If yours does not
|
|||||||
|
|
||||||
DELETE `/members/{memberRef}/groups`
|
DELETE `/members/{memberRef}/groups`
|
||||||
|
|
||||||
::: warn
|
::: warning
|
||||||
Not all HTTP implementations support DELETE requests with a body. If yours does not, consider using the [Remove Member From Group](#remove-member-from-group) endpoint instead.
|
Not all HTTP implementations support DELETE requests with a body. If yours does not, consider using the [Remove Member From Group](#remove-member-from-group) endpoint instead.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -109,8 +109,8 @@ GET `/members/{memberRef}/guilds/{guild_id}`
|
|||||||
|
|
||||||
Returns a [member guild settings](/api/models#member-guild-settings) object.
|
Returns a [member guild settings](/api/models#member-guild-settings) object.
|
||||||
|
|
||||||
::: note
|
::: tip
|
||||||
You must already have updated per-guild settings for a member in the target guild before being able to get or update them from the API.
|
You must already have updated per-guild settings for the target member in the target guild before being able to get or update them from the API.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Update Member Guild Settings
|
### Update Member Guild Settings
|
||||||
@ -172,7 +172,7 @@ PUT `/groups/{groupRef}/members/{memberRef}`
|
|||||||
|
|
||||||
PUT `/groups/{groupRef}/members`
|
PUT `/groups/{groupRef}/members`
|
||||||
|
|
||||||
::: warn
|
::: warning
|
||||||
Not all HTTP implementations support PUT requests with a body. If yours does not, consider using the [Add Member To Group](#add-group-member) endpoint instead.
|
Not all HTTP implementations support PUT requests with a body. If yours does not, consider using the [Add Member To Group](#add-group-member) endpoint instead.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ DELETE `/groups/{groupRef}/members/{memberRef}`
|
|||||||
|
|
||||||
DELETE `/groups/{groupRef}/members`
|
DELETE `/groups/{groupRef}/members`
|
||||||
|
|
||||||
::: warn
|
::: warning
|
||||||
Not all HTTP implementations support DELETE requests with a body. If yours does not, consider using the [Remove Member From Group](#remove-member-from-group) endpoint instead.
|
Not all HTTP implementations support DELETE requests with a body. If yours does not, consider using the [Remove Member From Group](#remove-member-from-group) endpoint instead.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ Every PluralKit entity has two IDs: a short (5-character) ID and a longer UUID.
|
|||||||
|
|
||||||
|key|type|notes|
|
|key|type|notes|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
|id|uuid||
|
||||||
|timestamp|datetime||
|
|timestamp|datetime||
|
||||||
| members | list of id/Member | Is sometimes in plain ID list form (eg. `GET /systems/:id/switches`), sometimes includes the full Member model (eg. `GET /systems/:id/fronters`). |
|
| members | list of id/Member | Is sometimes in plain ID list form (eg. `GET /systems/:id/switches`), sometimes includes the full Member model (eg. `GET /systems/:id/fronters`). |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user