Skip to content

Pagination API is flawed #389

Open
Open

Description

@dcsobral

Github API documentation repeatedly emphasizes that one should not construct URLs when paginating, but use the ones provided.

Note: It's important to form calls with Link header values instead of constructing your own URLs. Link Header

Always rely on these link relations provided to you. Don't try to guess or construct your own URL. Basics of Pagination

The way I see it, GHResult should have a nextPage: Option[() => GHResponse accessor.

On a minor note, I sometimes feel limited by not having methods such as listPullRequest be part of the algebra as free monads, so that they could be passed around, and modified elsewhere. For example, I'm doing some stuff that requires extra headers, and I'd much rather do a map at the application entry point over the whole thing than change every call to include an optional map. If such an approach had been taken, then nextPage would be Option[MethodsFreeMonad]. But I digress.

Activity

  1. kalexmills commented on Mar 25, 2020

    @kalexmills
    Contributor

    Related to #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions