Skip to content

Add GitHub.API.Gateway which calls HTTPoison #1131

@joshsmith

Description

@joshsmith

Problem

We should add an API.Gateway which simply has a request method that calls HTTPosion. Response parsing can be done in this module. We can then mock the gateway in tests, and mock %HTTPoison.Response{} so that we can include the headers (e.g. for pagination).

We'll need to refactor GitHub.API.EagerAPI to make use of this in marshall_response

  • check if the headers contains a "Links" key
  • if it does, it calls the code which makes additional requests for further pages

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions