Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1018 Bytes

File metadata and controls

35 lines (25 loc) · 1018 Bytes

Github Client

An HTTP Client to Github API in pure Erlang.

  • Read-only end-points (GET)
  • rate limited client
  • cache support
  • JSON decoding
  • pipeline features (filtering)

Usage

  1. Create a new read-only token using your Github Account Developer Settings

  2. Save this token in a safe place.

  3. Export this token in your current session or you can set it directly from the application if needed.

    export GITHUB_TOKEN="github_fake_11AAWYNWA033xsTk1RMLUx_Y9ScUJGAPhnWKWbXX03M05QA84y1g7va"
    os:putenv("GITHUB_TOKEN", "github_fake_11AAWYNWA033xsTk1RMLUx_Y9ScUJGAPhnWKWbXX03M05QA84y1g7va").
    application:set_env(github, token, "github_fake_11AAWYNWA033xsTk1RMLUx_Y9ScUJGAPhnWKWbXX03M05QA84y1g7va").
  4. Fetch some data. By default, all requests are stored in github_cache Mnesia table.

    github:get_repos_url(<<"https://github.com/erlang-punch/awesome-erlang">>,#{}).