GroupMe OAuth and data fetching methods, new Verticals, and some refactoring#55
Merged
Conversation
lisad
approved these changes
Aug 19, 2025
| from pardner.services.base import ( | ||
| UnsupportedVerticalException as UnsupportedVerticalException, | ||
| ) | ||
| from pardner.services.groupme import GroupMeTransferService as GroupMeTransferService |
Member
There was a problem hiding this comment.
You don't have to do 'as' if you're not renaming it ... right?
Collaborator
Author
There was a problem hiding this comment.
I set up the linter to flag unused imports, so re-exporting with the same name is communicating to the linter that it's being done intentionally (in this case, to publicly expose the class!). More info: https://docs.astral.sh/ruff/rules/unused-import/
Member
There was a problem hiding this comment.
thank you, I did not realize that.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Apologies for the long PR! More than half of it is just tests and method descriptions.
Closes #41 #54
GroupMe
pardner) to make a request to its authorization server to obtain the access token. That happens in a single request from the client.Base Service class configuration and helper methods
client_secretis optional now since GroupMe doesn't use it._get_resource_from_pathfor passing in just the unique part of the API endpoint path (so'users'in'https://api.tumblr.com/v2/users', for example)._build_resource_urlfor getting the full API endpoint URL from the unique part described in the bullet point above.Sample responses
fetch_user_data{ "created_at": "##########", "email": "***********@*****.***", "email_verified": "False", "facebook_connected": "False", "id": "########", "image_url": "*****://*.*******.***/###*###.****.########***####**###**####*#####", "locale": "**_**", "microsoft_connected": "False", "name": "****** *****", "bio": null, "phone_number": "+# ##########", "sms": "False", "twitter_connected": "False", "updated_at": "##########", "user_id": "########", "zip_code": null, "share_url": null, "share_qr_code_url": null, "mfa": { "enabled": "False", "channels": [ { "type": "*****_******", "created_at": "##########" } ] }, "tags": [ "*****-**" ], "prompt_for_survey": "False", "show_age_gate": "False", "birth_date_set": "True", "graduation_year": "", "campus_profile_visibility": "*******" }fetch_blocked_users[ { "user_id": "########", "blocked_user_id": "########" } ]fetch_conversations_direct[ { "created_at": "##########", "last_message": { "attachments": [ { "type": "*****", "url": "*****://*.*******.***/###*###.***.#####****#####*#*##***#*###*###*" } ], "avatar_url": null, "conversation_id": "########+#########", "created_at": "##########", "favorited_by": [], "id": "##################", "name": "*******", "recipient_id": "########", "sender_id": "#########", "sender_type": "****", "source_guid": "**#*##*########**#####****##****", "text": null, "user_id": "#########", "pinned_at": null, "pinned_by": "" }, "messages_count": "#", "other_user": { "avatar_url": "", "id": "#########", "name": "*******" }, "updated_at": "##########", "message_deletion_period": "##########", "message_deletion_mode": [ "******" ], "requires_approval": "False", "unread_count": null, "last_read_message_id": null, "last_read_at": null, "message_edit_period": "##" } ]fetch_conversations_group[ { "id": "########", "group_id": "########", "name": "******+ **", "phone_number": "+# ##########", "type": "*******", "description": "", "image_url": "*****://*.*******.***/###*###.****.#**##***#***##*###**##*######***", "creator_user_id": "#########", "created_at": "##########", "updated_at": "##########", "muted_until": "############", "messages": { "count": "#####", "last_message_id": "##################", "last_message_created_at": "##########", "last_message_updated_at": "##########", "preview": { "nickname": "****** ******", "text": "*** ****! *** ****** ***** *** *** **** ******* ##-##** *** *** #-#** ***. ****** *** **** ******* ##:##-##:##** *** *** ******* ******* *** #:##-#:##** *** *******! ***** *** * **** ** *** *****!", "image_url": "*****://*.*******.***/####*####.****.####*#**###########*###*########", "attachments": [ { "type": "*****", "user_id": "#########", "reply_id": "##################", "base_reply_id": "##################" } ] } }, "max_members": "####", "theme_name": null, "like_icon": null, "requires_approval": "False", "show_join_question": "False", "join_question": null, "message_deletion_period": "##########", "message_deletion_mode": ["*****", "******"], "message_edit_period": "##", "children_count": "#", "share_url": "*****://*******.***/****_*****/########/**#***", "share_qr_code_url": "*****://*****.*******.***/**/****_*****/########/**#***/*******?*********=*****%#*%#*%#**.*******.***%#*###*###.****.#**##***#***##*###**##*######***", "directories": null, "members": [ { "user_id": "########", "nickname": "***** ***", "image_url": "", "id": "##########", "muted": "False", "autokicked": "False", "roles": ["****"], "name": "***** ***" } ], "members_count": "###", "locations": null, "visibility": null, "category_ids": null, "active_call_participants": null, "unread_count": null, "last_read_message_id": null, "last_read_at": null } ]