Skip to content

[FEATURE] Add a GitHub client class for API interactions #279

Open
@guibranco

Description

Create a new GitHub client class for the Pancake project. This class will use the Pancake\Request class to interact with the GitHub API.

Requirements:

  1. Authentication:

    • Accept app data and/or a user token for authenticated API requests.
    • Dynamically use the appropriate credentials based on the type of request.
  2. API Methods:

    • Implement GitHub API endpoints as methods within the class.
    • Ensure the methods follow GitHub API's best practices and provide user-friendly abstractions.
  3. Error Management:

    • Handle errors internally with flexibility:
      • Option to log errors using the Pancake\Logger class.
      • Option to throw exceptions for unhandled errors.
      • Allow configuration of ignored HTTP status codes.
  4. Testing:

    • Provide unit and integration tests for the GitHub client class.
    • Ensure comprehensive coverage for both success and error scenarios.
  5. Documentation:

    • Update the project documentation to include:
      • Class overview.
      • Usage examples for common operations.
      • Explanation of error-handling options.

Benefits:

This feature will enhance Pancake's functionality by providing a robust and reusable interface for interacting with the GitHub API. It will simplify API calls and centralize error handling, promoting better maintainability and usability.

Notes:

  • Ensure the class is extensible for potential future API endpoints.
  • Maintain adherence to the Pancake project’s coding standards and structure.

Acceptance Criteria:

  • The GitHub client class has been implemented and is fully tested.
  • Documentation is updated with clear examples.
  • The error-handling mechanism works as configured (logging, throwing exceptions, ignoring specific status codes).

Metadata

Assignees

Labels

enhancementNew feature or requestgitautoGitAuto label to trigger the app in a issue.good first issueGood for newcomershacktoberfestParticipation in the Hacktoberfest eventhelp wantedExtra attention is needed📝 documentationTasks related to writing or updating documentation🕓 medium effortA task that can be completed in a few hours🧪 testsTasks related to testing

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions