Skip to content

GitHub

[Source]

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.

class val GitHub

Constructors

create

[Source]

new val create(
  creds: Credentials val)
: GitHub val^

Parameters

Returns


Public Functions

get_repo

[Source]

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


get_org_repos

[Source]

Lists all repositories in a GitHub organization.

fun box get_org_repos(
  org: String val)
: Promise[(PaginatedList[Repository val] val | RequestError val)] tag

Parameters

Returns


get_gist

[Source]

Fetches a single gist by its ID.

fun box get_gist(
  gist_id: String val)
: Promise[(Gist val | RequestError val)] tag

Parameters

Returns


create_gist

[Source]

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

Returns


get_user_gists

[Source]

Lists the authenticated user's gists.

fun box get_user_gists()
: Promise[(PaginatedList[Gist val] val | RequestError val)] tag

Returns


get_public_gists

[Source]

Lists public gists.

fun box get_public_gists()
: Promise[(PaginatedList[Gist val] val | RequestError val)] tag

Returns


get_starred_gists

[Source]

Lists the authenticated user's starred gists.

fun box get_starred_gists()
: Promise[(PaginatedList[Gist val] val | RequestError val)] tag

Returns


get_username_gists

[Source]

Lists a specific user's public gists.

fun box get_username_gists(
  username: String val)
: Promise[(PaginatedList[Gist val] val | RequestError val)] tag

Parameters

Returns