-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Document new pin endpoints #7585
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
Conversation
docs/resources/message.mdx
Outdated
<Route method="GET">/channels/[\{channel.id\}](/docs/resources/channel#channel-object)/pins</Route> | ||
|
||
Gets the first 50 pinned messages in a channel, returning an array of [message](/docs/resources/message#message-object) objects on success. | ||
This endpoint is deprecated. Use the one above instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "above" might be confusing since it's a bit far away. This is a website, so we can use hrefs to refer to another section.
This endpoint is deprecated. Use the one above instead. | |
This endpoint is deprecated. Use [Get Channel Pins](/docs/resources/message#get-channel-pins) instead. |
I'd do the same for each deprecated endpoint.
| Field | Type | Description | Default | | ||
|---------|-------------------|-------------------------------------------|---------| | ||
| before? | ISO8601 timestamp | Get messages pinned before this timestamp | absent | | ||
| limit? | integer | Max number of pins to return (1-50) | 50 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| limit? | integer | Max number of pins to return (1-50) | 50 | | |
| limit? | integer | Max number of pins to return (2-50) | 50 | |
Setting the limit to 1 throws the following:
400 Bad Request (error code: 50035): Invalid Form Body
In limit: int value should be greater than or equal to 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to support limits of 1 for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this I suggest submitting an issue since we would likely want the endpoint to be able to return one pin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... this pull request has merged immaturely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: setting the limit to 1 works as it should now. I was calling a different endpoint, it still errors out when set to 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I let the team know about the issue, thanks for digging into it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, limit=1 works now
* document new pin endpoints * fix errors * fix tables * Update links --------- Co-authored-by: Anthony Tesija <anthony.tesija@discordapp.com>
Uh oh!
There was an error while loading. Please reload this page.