Skip to content

Commit

Permalink
update to current API state (mainly localization update)
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Feb 25, 2022
1 parent 41f20a4 commit 5285795
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
39 changes: 17 additions & 22 deletions docs/resources/Discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Used to represent a guild's Discovery settings.
| guild_id | snowflake | the guild id |
| primary_category_id | [discovery category](#DOCS_RESOURCES_DISCOVERY/discovery-category-object) id | the id of the primary discovery category set for this guild |
| keywords | ?array of strings | up to 10 discovery search keywords set for this guild |
| emoji_discoverability_enabled | boolean | whether guild info is shown when custom emojis from this guild are clicked |
| emoji_discoverability_enabled | boolean | whether guild info is shown when custom emojis and stickers from this guild are clicked |
| partner_actioned_timestamp | ?ISO8601 timestamp | when the server's partner application was accepted or denied, for applications via Server Settings |
| partner_application_timestamp | ?ISO8601 timestamp | when the server applied for partnership, if it has a pending application |
| category_ids | array of [discovery category](#DOCS_RESOURCES_DISCOVERY/discovery-category-object) ids | ids of up to 5 discovery subcategories set for this guild |
Expand All @@ -24,6 +24,8 @@ Used to represent a guild's Discovery settings.
"primary_category_id": 5,
"keywords": ["bug hunting"],
"emoji_discoverability_enabled": true,
"partner_actioned_timestamp": "2022-02-22T02:22:22.222222+00:00",
"partner_application_timestamp": null,
"category_ids": [22, 31, 39]
}
```
Expand All @@ -32,39 +34,32 @@ Used to represent a guild's Discovery settings.

###### Discovery Category Structure

| Field | Type | Description |
|------------|------------------------------------------------------------------------------------------------|----------------------------------------------------------------|
| id | integer | numeric id of the category |
| name | [discovery category name](#DOCS_RESOURCES_DISCOVERY/discovery-category-name-structure) object | the name of this category, in multiple languages |
| is_primary | boolean | whether this category can be set as a guild's primary category |

###### Discovery Category Name Structure

| Field | Type | Description |
|----------------|--------|-----------------------------|
| default | string | the name in English |
| localizations? | object | the name in other languages |
| Field | Type | Description |
|------------|---------|----------------------------------------------------------------|
| id | integer | numeric id of the category |
| name | string | the name of this category |
| is_primary | boolean | whether this category can be set as a guild's primary category |

###### Example Discovery Category

```json
{
"id": 1,
"name": {
"default": "Gaming",
"localizations": {
"de": "Gaming",
"fr": "Gaming",
"ru": "Игры"
}
},
"name": "Gaming",
"is_primary": true
}
```

## List Discovery Categories % GET /discovery/categories

Returns an array of [discovery category](#DOCS_RESOURCES_DISCOVERY/discovery-category-object) objects that can be used when editing guilds.
###### Query String Params

| Field | Type | Description | Required | Default |
|--------------|---------|-------------------------------------------------------------------------------|----------|---------|
| locale | string | the [language](#DOCS_REFERENCE/locales) to return category names in | false | en-US |
| primary_only | boolean | whether to filter to categories that can be set as a guild's primary category | false | false |

Returns an array of [discovery category](#DOCS_RESOURCES_DISCOVERY/discovery-category-object) objects.

## Validate Discovery Search Term % GET /discovery/valid-term

Expand Down
10 changes: 5 additions & 5 deletions docs/resources/Guild.md
Original file line number Diff line number Diff line change
Expand Up @@ -1102,11 +1102,11 @@ Modify the [discovery metadata](#DOCS_RESOURCES_DISCOVERY/discovery-metadata-obj
###### JSON Params

| Field | Type | Description | Default |
| ----------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------- | ------- |
| primary_category_id | [discovery category](#DOCS_RESOURCES_DISCOVERY/discovery-category-object) id | the id of the primary discovery category | 0 |
| keywords | array of strings | up to 10 discovery search keywords | null |
| emoji_discoverability_enabled | boolean | whether guild info is shown when custom emojis are clicked | true |
| Field | Type | Description | Default |
| ----------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------- |
| primary_category_id | [discovery category](#DOCS_RESOURCES_DISCOVERY/discovery-category-object) id | the id of the primary discovery category | 0 |
| keywords | array of strings | up to 10 discovery search keywords | null |
| emoji_discoverability_enabled | boolean | whether guild info should be shown when custom emojis and stickers from this guild are clicked | true |

## Add Guild Discovery Subcategory % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/discovery-categories/{category.id#DOCS_RESOURCES_DISCOVERY/discovery-category-object}

Expand Down

0 comments on commit 5285795

Please sign in to comment.