Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Application Endpoints #6297

Merged
merged 10 commits into from
Sep 28, 2023

Conversation

shaydewael
Copy link
Contributor

  • Documents PATCH method for current applications, which allows you to update a partial set of properties via the API
  • Adds interactions_endpoint_url, bot, and redirect_uris to Application structure
  • Cleans up descriptions for Application structure

docs/resources/Application.md Outdated Show resolved Hide resolved
| terms_of_service_url? | string | URL of the app's Terms of Service |
| privacy_policy_url? | string | URL of the app's Privacy Policy |
| owner? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the owner of the app |
| summary *(deprecated)* | string | **deprecated and will be removed in v11.** An empty string. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| summary *(deprecated)* | string | **deprecated and will be removed in v11.** An empty string. |
| summary *(deprecated)* | string | **Deprecated and will be removed in v11.** An empty string. |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is deprecated and always an empty string, maybe we can just undocument this field?

| team | ?[team](#DOCS_TOPICS_TEAMS/data-models-team-object) object | If the app belongs to a team, this will be a list of the members of that team |
| guild_id? | snowflake | Guild associated with the app. For example, a developer support server. |
| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | Partial object of the associated guild |
| primary_sku_id? | snowflake | If this app is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"if exists" sounds weird, like the sentence didn't ended

docs/resources/Application.md Outdated Show resolved Hide resolved
| approximate_guild_count? | integer | Approximate count of number of guilds the app has been added to |
| redirect_uris? | array of strings | Array of redirect URIs for the app |
| interactions_endpoint_url? | string | [Interactions endpoint URL](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) for the app |
| role_connections_verification_url? | string | Role connection verification URL for the app |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to topic?

| --------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| custom_install_url | string | Default custom authorization URL for the app, if enabled |
| description | string | Description of the app |
| role_connections_verification_url | string | Role connection verification URL for the app |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to topic?

| custom_install_url | string | Default custom authorization URL for the app, if enabled |
| description | string | Description of the app |
| role_connections_verification_url | string | Role connection verification URL for the app |
| install_params | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| install_params | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled |
| install_params | ?[install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled |

It seems that install_params can be set to null in order to remove them.

| rpc_origins? | array of strings | List of RPC origin URLs, if RPC is enabled |
| bot_public | boolean | when `false`, only the app owner can add the app to guilds |
| bot_require_code_grant | boolean | when `true`, the app's bot will only join upon completion of the full OAuth2 code grant flow |
| bot? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the bot user associated with the app |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any chance the payload of this could be reworked to match what is returned from /users/@me?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would suggest opening an issue about this for sure (if there hasn't been one opened already).

@Rapptz
Copy link
Contributor

Rapptz commented Jul 18, 2023

This seems like a close solution to #4726. Would it be possible for that bot user to have the same keys that /users/@me has? That endpoint has verified, locale, and mfa_enabled which are missing here. Admittedly these are somewhat niche or useless but my library's ClientUser data type includes these keys.

| terms_of_service_url? | string | URL of the app's Terms of Service |
| privacy_policy_url? | string | URL of the app's Privacy Policy |
| owner? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the owner of the app |
| summary *(deprecated)* | string | **deprecated and will be removed in v11.** An empty string. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is deprecated and always an empty string, maybe we can just undocument this field?

| verify_key | string | Hex encoded key for verification in interactions and the GameSDK's [GetTicket](#DOCS_GAME_SDK_APPLICATIONS/getticket) |
| team | ?[team](#DOCS_TOPICS_TEAMS/data-models-team-object) object | If the app belongs to a team, this will be a list of the members of that team |
| guild_id? | snowflake | Guild associated with the app. For example, a developer support server. |
| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | Partial object of the associated guild |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, the guild field is only present if the support server is DISCOVERABLE. Maybe this can be mentioned here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct.

@shaydewael shaydewael merged commit 0e11b77 into discord:main Sep 28, 2023
3 checks passed
@shaydewael shaydewael deleted the update-application-endpoints branch September 28, 2023 17:58
Nihlus added a commit to Remora/Remora.Discord that referenced this pull request Oct 29, 2023
suneettipirneni added a commit to twilight-rs/twilight that referenced this pull request Dec 30, 2023
…cation fields (#2284)

Ref:
- discord/discord-api-docs#6297

Additionally, this changes the path for `get_user_application` to be
`/application/@me` instead of `/oauth2/applications/@me` for
consistency. This returns the same data and shouldn't effect any users.
shaydewael added a commit to Jupith/discord-api-docs that referenced this pull request May 14, 2024
* update application endpoints

* make bot optional

* uh

* add back approximate_guild_count

* aaa

* Update docs/resources/Application.md

Co-authored-by: Lala Sabathil <aiko@aitsys.dev>

* Update docs/resources/Application.md

Co-authored-by: Lala Sabathil <aiko@aitsys.dev>

* TABLES

* tag characters

---------

Co-authored-by: Lala Sabathil <aiko@aitsys.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants