Library for interacting with the GitHub REST API.
GitHub REST API is an alpha-level package.
The library currently does not implement the GitHub REST API. It contains at minimum, the functionality required for various ponylang organization needs. Additional API surface and functionality will be added as needed. If you need functionality that is currently missing, please join us on the Pony Zulip and we can figure out if you opening a PR or using doing the work would be the best approach.
- Requires ponyc 0.69.1 or later.
- Install corral
corral add github.com/ponylang/github_rest_api.git --version 0.9.0corral fetchto fetch your dependenciesuse "github_rest_api"to include this packagecorral run -- ponycto compile your application
use "github_rest_api"
use "github_rest_api/request"
use lori = "lori"
actor Main
new create(env: Env) =>
let auth = lori.TCPConnectAuth(env.root)
let creds = Credentials(auth, "your-github-token")
GitHub(creds).get_repo("ponylang", "ponyc")
.next[None](PrintRepository~apply(env.out))
primitive PrintRepository
fun apply(out: OutStream, result: RepositoryOrError) =>
match \exhaustive\ result
| let repo: Repository =>
out.print(repo.full_name)
| let err: RequestError =>
out.print(err.message)
endSee the examples directory for more.