View Source GitHub.Codespaces (GitHub REST API Client v0.0.1)

Provides API endpoints related to codespaces

Link to this section Summary

Functions

Add selected repository to an organization secret

Create a codespace for the authenticated user

Create or update an organization secret

Create or update a secret for the authenticated user

Delete a codespace for the authenticated user

Delete an organization secret

Delete a secret for the authenticated user

Export a codespace for the authenticated user

List codespaces for a user in organization

Get a codespace for the authenticated user

Get an organization public key

Get public key for the authenticated user

Get a repository public key

Get a secret for the authenticated user

List devcontainer configurations in a repository for the authenticated user

List codespaces for the authenticated user

List codespaces for the organization

List codespaces in a repository for the authenticated user

List organization secrets

List secrets for the authenticated user

List selected repositories for an organization secret

Remove selected repository from an organization secret

List available machine types for a repository

Manage access control for organization codespaces

Set selected repositories for an organization secret

Start a codespace for the authenticated user

Stop a codespace for the authenticated user

Stop a codespace for an organization user

Update a codespace for the authenticated user

Link to this section Functions

Link to this function

add_repository_for_secret_for_authenticated_user(secret_name, repository_id, opts \\ [])

View Source
@spec add_repository_for_secret_for_authenticated_user(
  String.t(),
  integer(),
  keyword()
) ::
  :ok | {:error, GitHub.Error.t()}

Add a selected repository to a user secret

resources

Resources

Link to this function

add_selected_repo_to_org_secret(org, secret_name, repository_id, opts \\ [])

View Source
@spec add_selected_repo_to_org_secret(String.t(), String.t(), integer(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Add selected repository to an organization secret

resources

Resources

Link to this function

codespace_machines_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec codespace_machines_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List machine types for a codespace

resources

Resources

Link to this function

create_for_authenticated_user(body, opts \\ [])

View Source
@spec create_for_authenticated_user(
  map(),
  keyword()
) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Create a codespace for the authenticated user

resources

Resources

Link to this function

create_or_update_org_secret(org, secret_name, body, opts \\ [])

View Source
@spec create_or_update_org_secret(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update an organization secret

resources

Resources

Link to this function

create_or_update_repo_secret(owner, repo, secret_name, body, opts \\ [])

View Source
@spec create_or_update_repo_secret(
  String.t(),
  String.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update a repository secret

resources

Resources

Link to this function

create_or_update_secret_for_authenticated_user(secret_name, body, opts \\ [])

View Source
@spec create_or_update_secret_for_authenticated_user(String.t(), map(), keyword()) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update a secret for the authenticated user

resources

Resources

Link to this function

create_with_pr_for_authenticated_user(owner, repo, pull_number, body, opts \\ [])

View Source
@spec create_with_pr_for_authenticated_user(
  String.t(),
  String.t(),
  integer(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Create a codespace from a pull request

resources

Resources

Link to this function

create_with_repo_for_authenticated_user(owner, repo, body, opts \\ [])

View Source
@spec create_with_repo_for_authenticated_user(
  String.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Create a codespace in a repository

resources

Resources

Link to this function

delete_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec delete_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

Delete a codespace for the authenticated user

resources

Resources

Link to this function

delete_from_organization(org, username, codespace_name, opts \\ [])

View Source
@spec delete_from_organization(String.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

Delete a codespace from the organization

resources

Resources

Link to this function

delete_org_secret(org, secret_name, opts \\ [])

View Source
@spec delete_org_secret(String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete an organization secret

resources

Resources

Link to this function

delete_repo_secret(owner, repo, secret_name, opts \\ [])

View Source
@spec delete_repo_secret(String.t(), String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete a repository secret

resources

Resources

Link to this function

delete_secret_for_authenticated_user(secret_name, opts \\ [])

View Source
@spec delete_secret_for_authenticated_user(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a secret for the authenticated user

resources

Resources

Link to this function

export_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec export_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, GitHub.Codespace.ExportDetails.t()} | {:error, GitHub.Error.t()}

Export a codespace for the authenticated user

resources

Resources

Link to this function

get_codespaces_for_user_in_org(org, username, opts \\ [])

View Source
@spec get_codespaces_for_user_in_org(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List codespaces for a user in organization

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

get_export_details_for_authenticated_user(codespace_name, export_id, opts \\ [])

View Source
@spec get_export_details_for_authenticated_user(String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Codespace.ExportDetails.t()} | {:error, GitHub.Error.t()}

Get details about a codespace export

resources

Resources

Link to this function

get_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec get_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Get a codespace for the authenticated user

resources

Resources

Link to this function

get_org_public_key(org, opts \\ [])

View Source
@spec get_org_public_key(
  String.t(),
  keyword()
) :: {:ok, GitHub.Codespace.PublicKey.t()} | {:error, GitHub.Error.t()}

Get an organization public key

resources

Resources

Link to this function

get_org_secret(org, secret_name, opts \\ [])

View Source
@spec get_org_secret(String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Codespace.OrgSecret.t()} | {:error, GitHub.Error.t()}

Get an organization secret

resources

Resources

Link to this function

get_public_key_for_authenticated_user(opts \\ [])

View Source
@spec get_public_key_for_authenticated_user(keyword()) ::
  {:ok, GitHub.Codespace.UserPublicKey.t()} | {:error, GitHub.Error.t()}

Get public key for the authenticated user

resources

Resources

Link to this function

get_repo_public_key(owner, repo, opts \\ [])

View Source
@spec get_repo_public_key(String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Codespace.PublicKey.t()} | {:error, GitHub.Error.t()}

Get a repository public key

resources

Resources

Link to this function

get_repo_secret(owner, repo, secret_name, opts \\ [])

View Source
@spec get_repo_secret(String.t(), String.t(), String.t(), keyword()) ::
  {:ok, GitHub.RepoCodespacesSecret.t()} | {:error, GitHub.Error.t()}

Get a repository secret

resources

Resources

Link to this function

get_secret_for_authenticated_user(secret_name, opts \\ [])

View Source
@spec get_secret_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, GitHub.Codespace.Secret.t()} | {:error, GitHub.Error.t()}

Get a secret for the authenticated user

resources

Resources

Link to this function

list_devcontainers_in_repository_for_authenticated_user(owner, repo, opts \\ [])

View Source
@spec list_devcontainers_in_repository_for_authenticated_user(
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List devcontainer configurations in a repository for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_for_authenticated_user(opts \\ [])

View Source
@spec list_for_authenticated_user(keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List codespaces for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.
  • repository_id (integer): ID of the Repository to filter on

resources

Resources

Link to this function

list_in_organization(org, opts \\ [])

View Source
@spec list_in_organization(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List codespaces for the organization

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_in_repository_for_authenticated_user(owner, repo, opts \\ [])

View Source
@spec list_in_repository_for_authenticated_user(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List codespaces in a repository for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_org_secrets(org, opts \\ [])

View Source
@spec list_org_secrets(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List organization secrets

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_repo_secrets(owner, repo, opts \\ [])

View Source
@spec list_repo_secrets(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List repository secrets

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_repositories_for_secret_for_authenticated_user(secret_name, opts \\ [])

View Source
@spec list_repositories_for_secret_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List selected repositories for a user secret

resources

Resources

Link to this function

list_secrets_for_authenticated_user(opts \\ [])

View Source
@spec list_secrets_for_authenticated_user(keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List secrets for the authenticated user

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_selected_repos_for_org_secret(org, secret_name, opts \\ [])

View Source
@spec list_selected_repos_for_org_secret(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List selected repositories for an organization secret

options

Options

  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).

resources

Resources

Link to this function

pre_flight_with_repo_for_authenticated_user(owner, repo, opts \\ [])

View Source
@spec pre_flight_with_repo_for_authenticated_user(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

Get default attributes for a codespace

options

Options

  • ref (String.t()): The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked.
  • client_ip (String.t()): An alternative IP for default location auto-detection, such as when proxying a request.

resources

Resources

Link to this function

remove_repository_for_secret_for_authenticated_user(secret_name, repository_id, opts \\ [])

View Source
@spec remove_repository_for_secret_for_authenticated_user(
  String.t(),
  integer(),
  keyword()
) ::
  :ok | {:error, GitHub.Error.t()}

Remove a selected repository from a user secret

resources

Resources

Link to this function

remove_selected_repo_from_org_secret(org, secret_name, repository_id, opts \\ [])

View Source
@spec remove_selected_repo_from_org_secret(
  String.t(),
  String.t(),
  integer(),
  keyword()
) ::
  :ok | {:error, GitHub.Error.t()}

Remove selected repository from an organization secret

resources

Resources

Link to this function

repo_machines_for_authenticated_user(owner, repo, opts \\ [])

View Source
@spec repo_machines_for_authenticated_user(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List available machine types for a repository

options

Options

  • location (String.t()): The location to check for available machines. Assigned by IP if not provided.
  • client_ip (String.t()): IP for location auto-detection when proxying a request

resources

Resources

Link to this function

set_codespaces_billing(org, body, opts \\ [])

View Source
@spec set_codespaces_billing(String.t(), map(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Manage access control for organization codespaces

resources

Resources

Link to this function

set_repositories_for_secret_for_authenticated_user(secret_name, body, opts \\ [])

View Source
@spec set_repositories_for_secret_for_authenticated_user(String.t(), map(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Set selected repositories for a user secret

resources

Resources

Link to this function

set_selected_repos_for_org_secret(org, secret_name, body, opts \\ [])

View Source
@spec set_selected_repos_for_org_secret(String.t(), String.t(), map(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Set selected repositories for an organization secret

resources

Resources

Link to this function

start_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec start_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Start a codespace for the authenticated user

resources

Resources

Link to this function

stop_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec stop_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Stop a codespace for the authenticated user

resources

Resources

Link to this function

stop_in_organization(org, username, codespace_name, opts \\ [])

View Source
@spec stop_in_organization(String.t(), String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Stop a codespace for an organization user

resources

Resources

Link to this function

update_for_authenticated_user(codespace_name, body, opts \\ [])

View Source
@spec update_for_authenticated_user(String.t(), map(), keyword()) ::
  {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}

Update a codespace for the authenticated user

resources

Resources