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

Spond.get_messages: add max_chats parameter (default 100) and populate Spond.messages. #146

Conversation

elliot-100
Copy link
Collaborator

@elliot-100 elliot-100 commented Jul 26, 2024

This PR:

  • Re Allow Spond.get_messages to get more than 10 messages. #144: Adds an optional max_chats parameter to Spond.get_messages(); defaults to 100. Previously up to 10 chats were returned.
  • Re Spond.get_messages() doesn't populate Spond.messages #145: #Changes Spond.get_messages() so it populates Spond.messages in line with other get_{multiple_items_from_api}() methods.
  • Updates manual_test_functions to use the new parameter (and extracts all max values to constants)
  • Where possible, uses the term 'chats' instead of `messages' which is more accurate (a chat can contain many messages) but not to the extent of changing the API - that can be discussed later.

@elliot-100 elliot-100 self-assigned this Jul 26, 2024
@elliot-100 elliot-100 changed the title Spond.get_messages: add max_chats parameter and populate Spond.messages. Spond.get_messages: add max_chats parameter (default 100) and populate Spond.messages. Jul 26, 2024
@elliot-100 elliot-100 force-pushed the 144-allow-spondget_messages-to-get-more-than-10-messages-1 branch 2 times, most recently from ce5d441 to c1d3af5 Compare August 2, 2024 10:13
@elliot-100 elliot-100 force-pushed the 144-allow-spondget_messages-to-get-more-than-10-messages-1 branch from c1d3af5 to 4f9a826 Compare August 14, 2024 14:55
@elliot-100 elliot-100 requested a review from Olen August 14, 2024 14:58
@elliot-100 elliot-100 marked this pull request as ready for review August 14, 2024 14:58
@elliot-100 elliot-100 linked an issue Aug 14, 2024 that may be closed by this pull request
@Olen
Copy link
Owner

Olen commented Aug 14, 2024

Looks fine by reading through it. Have not tested it in real life

@elliot-100 elliot-100 linked an issue Aug 14, 2024 that may be closed by this pull request
@elliot-100
Copy link
Collaborator Author

elliot-100 commented Aug 14, 2024

Thanks @Olen. I have tested it with manual_test_functions.py. But I will leave this PR open for a while in case any other users have comments/issues.

Edit: reworked manual_test_functions.py a little.

@elliot-100 elliot-100 merged commit 6884659 into Olen:main Aug 22, 2024
5 checks passed
@elliot-100 elliot-100 deleted the 144-allow-spondget_messages-to-get-more-than-10-messages-1 branch August 22, 2024 08:46
@elliot-100 elliot-100 removed the request for review from Olen October 22, 2024 10:25
@elliot-100 elliot-100 added the enhancement New feature or request label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spond.get_messages() doesn't populate Spond.messages Allow Spond.get_messages to get more than 10 messages.
2 participants