GitHub¶
Entry point for all GitHub REST API operations. Holds credentials and authentication context used to issue requests. Each method corresponds to a top-level API operation; returned models provide convenience methods for further related calls.
Constructors¶
create¶
Parameters¶
- creds: Credentials val
Returns¶
- GitHub val^
Public Functions¶
get_repo¶
Fetches a repository by owner and name.
fun box get_repo(
owner: String val,
repo: String val)
: Promise[(Repository val | RequestError val)] tag
Parameters¶
Returns¶
- Promise[(Repository val | RequestError val)] tag
get_org_repos¶
Lists all repositories in a GitHub organization.
fun box get_org_repos(
org: String val)
: Promise[(PaginatedList[Repository val] val | RequestError val)] tag
Parameters¶
- org: String val
Returns¶
- Promise[(PaginatedList[Repository val] val | RequestError val)] tag
get_gist¶
Fetches a single gist by its ID.
Parameters¶
- gist_id: String val
Returns¶
- Promise[(Gist val | RequestError val)] tag
create_gist¶
Creates a new gist with the given files. Each entry in files is a
(filename, content) pair.
fun box create_gist(
files: Array[(String val , String val)] val,
description: (String val | None val) = reference,
is_public: Bool val = false)
: Promise[(Gist val | RequestError val)] tag
Parameters¶
- files: Array[(String val , String val)] val
- description: (String val | None val) = reference
- is_public: Bool val = false
Returns¶
- Promise[(Gist val | RequestError val)] tag
get_user_gists¶
Lists the authenticated user's gists.
Returns¶
- Promise[(PaginatedList[Gist val] val | RequestError val)] tag
get_public_gists¶
Lists public gists.
Returns¶
- Promise[(PaginatedList[Gist val] val | RequestError val)] tag
get_starred_gists¶
Lists the authenticated user's starred gists.
Returns¶
- Promise[(PaginatedList[Gist val] val | RequestError val)] tag
get_username_gists¶
Lists a specific user's public gists.
fun box get_username_gists(
username: String val)
: Promise[(PaginatedList[Gist val] val | RequestError val)] tag
Parameters¶
- username: String val
Returns¶
- Promise[(PaginatedList[Gist val] val | RequestError val)] tag