-
Notifications
You must be signed in to change notification settings - Fork 7
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
User routes update #537
Merged
Merged
User routes update #537
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kozabrada123
added
Status: In Progress
Type: Enhancement
Enhances an existing feature or behaviour.
Type: New feature
Module: API
labels
Jul 28, 2024
Closed
Adds GET /users/@me/mentions and DELETE /users/@me/mentions/{message.id}
Also adds /types/entities/harvest.rs, types for Harvest
This was
linked to
issues
Aug 9, 2024
Closed
Closed
This was referenced Sep 27, 2024
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Open
bitfl0wer
pushed a commit
that referenced
this pull request
Oct 10, 2024
* feat: Add UserProfile and other types * api: re-do a large part of the users api * feat: add modify user profile * feat: delete and disable user endpoints * feat: modify email and verify email endpoints * feat!: add discriminator parameter to get_user_by_username * feat!: add get_user_profile query string schema * chore: add integration expire behavior * feat: add get_pomelo_suggestions and get_pomelo_eligibility * feat: add create_pomelo_migration * fix: rustdoc lints * feat: recent_mentions endpoints Adds GET /users/@me/mentions and DELETE /users/@me/mentions/{message.id} * feat: add get_user_harvest & create_user_harvest Also adds /types/entities/harvest.rs, types for Harvest * feat: user notes endpoints Adds: get_user_notes, get_user_note, set_user_note * feat: add #545 and #546 Adds the RECENT_MENTION_DELETE and USER_NOTE_UPDATE gateway events. The events can be accessed at: message.recent_mention_delete & user.note_update * feat: add authorize_connection Also adds: src/types/entities/connection.rs, Connection and PublicConnection, src/api/users/connections.rs * feat: add rest* of Connections api * The only thing not added yet is create_domain_connection, because it uses errors in a funky way adds: - create_connection_callback - create_contact_sync_connection - get_connections - refresh_connection - modify_connection - delete_connection - get_connection_access_token - get_connection_subreddits + related schema for all those routes, and some supporting types * feat: add connected_accounts to UserProfile * feat: add affinities * feat: add get_premium_usage endpoint note: not fully tested; I do not have an account with premium * cliipy my arch nemesis strikes again * aa * feat: add create_domain_connection * feat: add get_burst_credits * grumble grumble * clippy * fix READY deserialization error on spacebar * fix a deserialization error on Spacebar See spacebarchat/server#1188 A deserialization error was happening with get_user_profile, where pronouns should have been serialized as an empty string, but were instead serialized as null. * skip serializing None query parameters * add test for get_user_profile * apparently Sb does not implement users/@me/notes * add some tests, minor connection updates - Document that create_domain_connection is unimplemented on Spacebar - Add Discord connection type - Change ConnectionType::array() into ConnectionType::vector() - returning a fixed size array is dubious, since it'll likely be expanded. Returning a vector is easier keep up to variable length - Add ConnectionType::discord_vector() and ConnectionType::spacebar_vector() to return a vector ConnectionTypes available on the respective server backends - add tests test_modify_user_profile, test_disable_user, test_get_user_note, test_set_user_note, test_get_user_affinities, test_get_guild_affinities, test_get_connections Note: connections are hard to test, since they require secrets / an external service's account * minor pre merge changes - add some extra doc comments - and into_public() for connection - remove a todo that is no longer valid
bitfl0wer
added a commit
that referenced
this pull request
Oct 10, 2024
Release tracker for v0.17.0 of chorus, set to release on October 10th, 2024. ## Public API changes - #561: Add missing fields in `GatewayReady` event, create `GatewayReadyBot` for Bots - #560: Differentiate between instance softwares through /version and /ping endpoints - #537: Implement 30 user routes - #565 : Fix sqlx En-/Decoding of PremiumType - #567 ## Internal changes ## Bugfixes - #565 : Fix sqlx En-/Decoding of PremiumType
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additions:
get_user_by_username
(note: Discord only)get_user_profile
(Get User Profile #191)modify_user_profile
(Modify User Profile #192)disable_user
(Disable User #193)initiate_email_change
(Modify User Email #196 note: untested, SB has it differently)verify_email_change
(Verify User Email Change #197 note: Discord only)get_pomelo_suggestions
(Get Pomelo Suggestions #198 note: Discord only)get_pomelo_eligibility
(Get Pomelo Eligibility #199 note: Discord only)create_pomelo_migration
(Create Pomelo Migration #200 note: Discord only)get_recent_mentions
(Get Recent Mentions #201 note: Discord only)delete_recent_mention
(Delete Recent Mention #202 note: Discord only)get_harvest
(Get User Harvest #203 note: Discord only)create_harvest
(Create User Harvest #204 note: Discord only)get_user_notes
(Get User Notes #205 note: Discord only)get_user_note
(Get User Note #206)set_user_note
(Modify User Note #207)authorize_connection
(Authorize User Connection #208 note: hard to test, the current testing server disallows all connection types)create_connection_callback
(Create User Connection Callback #209 note: hard to test)create_contact_sync_connection
(Create User Contact Sync Connection #210 note: hard to test)get_connections
(Get User Connections #211)get_connection_access_token
(Get User Connection Access Token #212 note: hard to test)get_connection_subreddits
(Get User Connection Subreddits #213 note: hard to test)refresh_connection
(Refresh User Connection #214 note: hard to test)modify_connection
(Modify User Connection #215 note: hard to test)delete_connection
(Delete User Connection #216 note: hard to test)get_user_affinities
(Get User Affinities #217)get_guild_affinities
(Get Guild Affinities #218)get_premium_usage
(Get User Premium Usage #220 note: Discord only)create_domain_connection
(Create Domain Connection #547 note: Discord only)get_burst_credits
(Get User Burst Credits #219 note: Discord only)RECENT_MENTION_DELETE
USER_CONNECTIONS_UPDATE
USER_NOTE_UPDATE
PremiumType
for User premium type, instead of relying onu8
Harvest
intotypes/entities/harvest.rs
, along with related typesConnection
intotypes/entities/connection.rs
, along with related typesChanges:
User::get
intoUser::get
(now for only other users) andUser::get_current
ChorusUser::delete
to take an optional passwordchorus_request.deserialize_response()
instead of panicing