feat(apiv2): docs fixes

This commit is contained in:
spiral 2021-10-22 17:54:47 -04:00
parent 7d36a39a57
commit 8e0e393f52
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31
4 changed files with 10 additions and 9 deletions

View File

@ -24,7 +24,7 @@ namespace PluralKit.API
else return Ok(system.ToJson(this.ContextFor(system), v: APIVersion.V2));
}
[HttpPatch]
[HttpPatch("@me")]
public async Task<IActionResult> DoSystemPatch([FromBody] JObject data)
{
var system = await ResolveSystem("@me");

View File

@ -123,8 +123,8 @@ namespace PluralKit.Core
o.Add("name", member.NameFor(ctx));
// 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("color", member.Color);
o.Add("birthday", member.BirthdayFor(ctx)?.FormatExport());
o.Add("pronouns", member.PronounsFor(ctx));
o.Add("avatar_url", member.AvatarFor(ctx).TryGetCleanCdnUrl());

View File

@ -32,7 +32,7 @@ GET `/systems/@me/guilds/{guild_id}`
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.
:::
@ -91,7 +91,7 @@ GET `/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.
:::
@ -99,7 +99,7 @@ Not all HTTP implementations support PUT requests with a body. If yours does not
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.
:::
@ -109,8 +109,8 @@ GET `/members/{memberRef}/guilds/{guild_id}`
Returns a [member guild settings](/api/models#member-guild-settings) object.
::: note
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.
::: tip
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
@ -172,7 +172,7 @@ PUT `/groups/{groupRef}/members/{memberRef}`
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.
:::
@ -184,7 +184,7 @@ DELETE `/groups/{groupRef}/members/{memberRef}`
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.
:::

View File

@ -80,6 +80,7 @@ Every PluralKit entity has two IDs: a short (5-character) ID and a longer UUID.
|key|type|notes|
|---|---|---|
|id|uuid||
|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`). |