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 API Version #107

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Nov 18, 2024

  1. Update API version to 21.0

    ---
    
    For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/YaVendio/heyoo?shareId=XXXX-XXXX-XXXX-XXXX).
    TerryCM committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    08ec66c View commit details
    Browse the repository at this point in the history
  2. Add retry logic to HTTP requests in heyoo/__init__.py

    * **Imports**
      - Import `Retry` and `HTTPAdapter` from `requests.adapters`.
    
    * **Session with retries**
      - Add `_get_session_with_retries` method to create a session with retry logic.
    
    * **Update methods**
      - Update `send_message`, `send_audio`, `send_image`, `send_video`, and other methods to use the session with retry logic.
    TerryCM committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    658af0d View commit details
    Browse the repository at this point in the history
  3. Add tests to check retry logic for various sending methods

    * **test_sending_audio.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_audio_retries` to check retry logic for `send_audio` method
    
    * **test_sending_button.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_button_retries` to check retry logic for `send_button` method
    
    * **test_sending_document.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_document_retries` to check retry logic for `send_document` method
    
    * **test_sending_image.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_image_retries` to check retry logic for `send_image` method
    
    * **test_sending_location.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_location_retries` to check retry logic for `send_location` method
    
    * **test_sending_message.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_message_retries` to check retry logic for `send_message` method
    
    * **test_sending_template_message.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_template_retries` to check retry logic for `send_template` method
    
    * **test_sending_video.py**
      - Import `requests`, `HTTPAdapter`, `Retry`, and `patch`
      - Add `test_send_video_retries` to check retry logic for `send_video` method
    TerryCM committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    8928200 View commit details
    Browse the repository at this point in the history