Struct roctogen::endpoints::codespaces::Codespaces [−][src]
pub struct Codespaces<'api> { /* fields omitted */ }
Implementations
pub async fn add_repository_for_secret_for_authenticated_user_async(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesAddRepositoryForSecretForAuthenticatedUserError>
pub async fn add_repository_for_secret_for_authenticated_user_async(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesAddRepositoryForSecretForAuthenticatedUserError>
Add a selected repository to a user secret
Adds a repository to the selected repositories for a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for add_repository_for_secret_for_authenticated_user
pub fn add_repository_for_secret_for_authenticated_user(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesAddRepositoryForSecretForAuthenticatedUserError>
pub fn add_repository_for_secret_for_authenticated_user(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesAddRepositoryForSecretForAuthenticatedUserError>
Add a selected repository to a user secret
Adds a repository to the selected repositories for a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for add_repository_for_secret_for_authenticated_user
pub async fn codespace_machines_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesCodespaceMachinesForAuthenticatedUserError>
pub async fn codespace_machines_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesCodespaceMachinesForAuthenticatedUserError>
List machine types for a codespace
List the machine types a codespace can transition to use.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for codespace_machines_for_authenticated_user
pub fn codespace_machines_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesCodespaceMachinesForAuthenticatedUserError>
pub fn codespace_machines_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesCodespaceMachinesForAuthenticatedUserError>
List machine types for a codespace
List the machine types a codespace can transition to use.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for codespace_machines_for_authenticated_user
pub async fn create_for_authenticated_user_async(
&self,
body: PostCodespacesCreateForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateForAuthenticatedUserError>
pub async fn create_for_authenticated_user_async(
&self,
body: PostCodespacesCreateForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateForAuthenticatedUserError>
Create a codespace for the authenticated user
Creates a new codespace, owned by the authenticated user.
This endpoint requires either a repository_id
OR a pull_request
but not both.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for create_for_authenticated_user
Create a codespace for the authenticated user
Creates a new codespace, owned by the authenticated user.
This endpoint requires either a repository_id
OR a pull_request
but not both.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for create_for_authenticated_user
pub async fn create_or_update_secret_for_authenticated_user_async(
&self,
secret_name: &str,
body: PutCodespacesCreateOrUpdateSecretForAuthenticatedUser
) -> Result<HashMap<String, Value>, CodespacesCreateOrUpdateSecretForAuthenticatedUserError>
pub async fn create_or_update_secret_for_authenticated_user_async(
&self,
secret_name: &str,
body: PutCodespacesCreateOrUpdateSecretForAuthenticatedUser
) -> Result<HashMap<String, Value>, CodespacesCreateOrUpdateSecretForAuthenticatedUserError>
Create or update a secret for the authenticated user
Creates or updates a secret for a user’s codespace with an encrypted value. Encrypt your secret using
LibSodium. You must authenticate using an access token with the user
scope to use this endpoint. User must also have Codespaces access to use this endpoint.
Example encrypting a secret using Node.js
Encrypt your secret using the tweetsodium library.
const sodium = require('tweetsodium');
const key = "base64-encoded-public-key";
const value = "plain-text-secret";
// Convert the message and key to Uint8Array's (Buffer implements that interface)
const messageBytes = Buffer.from(value);
const keyBytes = Buffer.from(key, 'base64');
// Encrypt using LibSodium.
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
// Base64 the encrypted secret
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);
Example encrypting a secret using Python
Encrypt your secret using pynacl with Python 3.
from base64 import b64encode
from nacl import encoding, public
def encrypt(public_key: str, secret_value: str) -> str:
"""Encrypt a Unicode string using the public key."""
public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
sealed_box = public.SealedBox(public_key)
encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
return b64encode(encrypted).decode("utf-8")
Example encrypting a secret using C#
Encrypt your secret using the Sodium.Core package.
var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
Example encrypting a secret using Ruby
Encrypt your secret using the rbnacl gem.
require "rbnacl"
require "base64"
key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
public_key = RbNaCl::PublicKey.new(key)
box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
encrypted_secret = box.encrypt("my_secret")
puts Base64.strict_encode64(encrypted_secret)
GitHub API docs for create_or_update_secret_for_authenticated_user
pub fn create_or_update_secret_for_authenticated_user(
&self,
secret_name: &str,
body: PutCodespacesCreateOrUpdateSecretForAuthenticatedUser
) -> Result<HashMap<String, Value>, CodespacesCreateOrUpdateSecretForAuthenticatedUserError>
pub fn create_or_update_secret_for_authenticated_user(
&self,
secret_name: &str,
body: PutCodespacesCreateOrUpdateSecretForAuthenticatedUser
) -> Result<HashMap<String, Value>, CodespacesCreateOrUpdateSecretForAuthenticatedUserError>
Create or update a secret for the authenticated user
Creates or updates a secret for a user’s codespace with an encrypted value. Encrypt your secret using
LibSodium. You must authenticate using an access token with the user
scope to use this endpoint. User must also have Codespaces access to use this endpoint.
Example encrypting a secret using Node.js
Encrypt your secret using the tweetsodium library.
const sodium = require('tweetsodium');
const key = "base64-encoded-public-key";
const value = "plain-text-secret";
// Convert the message and key to Uint8Array's (Buffer implements that interface)
const messageBytes = Buffer.from(value);
const keyBytes = Buffer.from(key, 'base64');
// Encrypt using LibSodium.
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
// Base64 the encrypted secret
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);
Example encrypting a secret using Python
Encrypt your secret using pynacl with Python 3.
from base64 import b64encode
from nacl import encoding, public
def encrypt(public_key: str, secret_value: str) -> str:
"""Encrypt a Unicode string using the public key."""
public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
sealed_box = public.SealedBox(public_key)
encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
return b64encode(encrypted).decode("utf-8")
Example encrypting a secret using C#
Encrypt your secret using the Sodium.Core package.
var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
Example encrypting a secret using Ruby
Encrypt your secret using the rbnacl gem.
require "rbnacl"
require "base64"
key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
public_key = RbNaCl::PublicKey.new(key)
box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
encrypted_secret = box.encrypt("my_secret")
puts Base64.strict_encode64(encrypted_secret)
GitHub API docs for create_or_update_secret_for_authenticated_user
pub async fn create_with_pr_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostCodespacesCreateWithPrForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithPrForAuthenticatedUserError>
pub async fn create_with_pr_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostCodespacesCreateWithPrForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithPrForAuthenticatedUserError>
Create a codespace from a pull request
Creates a codespace owned by the authenticated user for the specified pull request.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for create_with_pr_for_authenticated_user
pub fn create_with_pr_for_authenticated_user(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostCodespacesCreateWithPrForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithPrForAuthenticatedUserError>
pub fn create_with_pr_for_authenticated_user(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostCodespacesCreateWithPrForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithPrForAuthenticatedUserError>
Create a codespace from a pull request
Creates a codespace owned by the authenticated user for the specified pull request.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for create_with_pr_for_authenticated_user
pub async fn create_with_repo_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
body: PostCodespacesCreateWithRepoForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithRepoForAuthenticatedUserError>
pub async fn create_with_repo_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
body: PostCodespacesCreateWithRepoForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithRepoForAuthenticatedUserError>
Create a codespace in a repository
Creates a codespace owned by the authenticated user in the specified repository.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for create_with_repo_for_authenticated_user
pub fn create_with_repo_for_authenticated_user(
&self,
owner: &str,
repo: &str,
body: PostCodespacesCreateWithRepoForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithRepoForAuthenticatedUserError>
pub fn create_with_repo_for_authenticated_user(
&self,
owner: &str,
repo: &str,
body: PostCodespacesCreateWithRepoForAuthenticatedUser
) -> Result<Codespace, CodespacesCreateWithRepoForAuthenticatedUserError>
Create a codespace in a repository
Creates a codespace owned by the authenticated user in the specified repository.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for create_with_repo_for_authenticated_user
pub async fn delete_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<HashMap<String, Value>, CodespacesDeleteForAuthenticatedUserError>
pub async fn delete_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<HashMap<String, Value>, CodespacesDeleteForAuthenticatedUserError>
Delete a codespace for the authenticated user
Deletes a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for delete_for_authenticated_user
pub fn delete_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<HashMap<String, Value>, CodespacesDeleteForAuthenticatedUserError>
pub fn delete_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<HashMap<String, Value>, CodespacesDeleteForAuthenticatedUserError>
Delete a codespace for the authenticated user
Deletes a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for delete_for_authenticated_user
pub async fn delete_secret_for_authenticated_user_async(
&self,
secret_name: &str
) -> Result<(), CodespacesDeleteSecretForAuthenticatedUserError>
pub async fn delete_secret_for_authenticated_user_async(
&self,
secret_name: &str
) -> Result<(), CodespacesDeleteSecretForAuthenticatedUserError>
Delete a secret for the authenticated user
Deletes a secret from a user’s codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for delete_secret_for_authenticated_user
pub fn delete_secret_for_authenticated_user(
&self,
secret_name: &str
) -> Result<(), CodespacesDeleteSecretForAuthenticatedUserError>
pub fn delete_secret_for_authenticated_user(
&self,
secret_name: &str
) -> Result<(), CodespacesDeleteSecretForAuthenticatedUserError>
Delete a secret for the authenticated user
Deletes a secret from a user’s codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for delete_secret_for_authenticated_user
pub async fn get_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesGetForAuthenticatedUserError>
pub async fn get_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesGetForAuthenticatedUserError>
Get a codespace for the authenticated user
Gets information about a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for get_for_authenticated_user
pub fn get_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesGetForAuthenticatedUserError>
pub fn get_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesGetForAuthenticatedUserError>
Get a codespace for the authenticated user
Gets information about a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for get_for_authenticated_user
Get public key for the authenticated user
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the ‘read:user’ or ‘user’ scopes in their personal access token. User must have Codespaces access to use this endpoint.
GitHub API docs for get_public_key_for_authenticated_user
Get public key for the authenticated user
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the ‘read:user’ or ‘user’ scopes in their personal access token. User must have Codespaces access to use this endpoint.
GitHub API docs for get_public_key_for_authenticated_user
pub async fn get_secret_for_authenticated_user_async(
&self,
secret_name: &str
) -> Result<CodespacesSecret, CodespacesGetSecretForAuthenticatedUserError>
pub async fn get_secret_for_authenticated_user_async(
&self,
secret_name: &str
) -> Result<CodespacesSecret, CodespacesGetSecretForAuthenticatedUserError>
Get a secret for the authenticated user
Gets a secret available to a user’s codespaces without revealing its encrypted value.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for get_secret_for_authenticated_user
pub fn get_secret_for_authenticated_user(
&self,
secret_name: &str
) -> Result<CodespacesSecret, CodespacesGetSecretForAuthenticatedUserError>
pub fn get_secret_for_authenticated_user(
&self,
secret_name: &str
) -> Result<CodespacesSecret, CodespacesGetSecretForAuthenticatedUserError>
Get a secret for the authenticated user
Gets a secret available to a user’s codespaces without revealing its encrypted value.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for get_secret_for_authenticated_user
pub async fn list_for_authenticated_user_async(
&self,
query_params: Option<impl Into<CodespacesListForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListForAuthenticatedUserError>
pub async fn list_for_authenticated_user_async(
&self,
query_params: Option<impl Into<CodespacesListForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListForAuthenticatedUserError>
List codespaces for the authenticated user
Lists the authenticated user’s codespaces.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for list_for_authenticated_user
pub fn list_for_authenticated_user(
&self,
query_params: Option<impl Into<CodespacesListForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListForAuthenticatedUserError>
pub fn list_for_authenticated_user(
&self,
query_params: Option<impl Into<CodespacesListForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListForAuthenticatedUserError>
List codespaces for the authenticated user
Lists the authenticated user’s codespaces.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for list_for_authenticated_user
pub async fn list_in_repository_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<CodespacesListInRepositoryForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListInRepositoryForAuthenticatedUserError>
pub async fn list_in_repository_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<CodespacesListInRepositoryForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListInRepositoryForAuthenticatedUserError>
List codespaces in a repository for the authenticated user
Lists the codespaces associated to a specified repository and the authenticated user.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for list_in_repository_for_authenticated_user
pub fn list_in_repository_for_authenticated_user(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<CodespacesListInRepositoryForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListInRepositoryForAuthenticatedUserError>
pub fn list_in_repository_for_authenticated_user(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<CodespacesListInRepositoryForAuthenticatedUserParams>>
) -> Result<GetCodespacesListForAuthenticatedUserResponse200, CodespacesListInRepositoryForAuthenticatedUserError>
List codespaces in a repository for the authenticated user
Lists the codespaces associated to a specified repository and the authenticated user.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for list_in_repository_for_authenticated_user
List selected repositories for a user secret
List the repositories that have been granted the ability to use a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for list_repositories_for_secret_for_authenticated_user
List selected repositories for a user secret
List the repositories that have been granted the ability to use a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for list_repositories_for_secret_for_authenticated_user
pub async fn list_secrets_for_authenticated_user_async(
&self,
query_params: Option<impl Into<CodespacesListSecretsForAuthenticatedUserParams>>
) -> Result<GetCodespacesListSecretsForAuthenticatedUserResponse200, CodespacesListSecretsForAuthenticatedUserError>
pub async fn list_secrets_for_authenticated_user_async(
&self,
query_params: Option<impl Into<CodespacesListSecretsForAuthenticatedUserParams>>
) -> Result<GetCodespacesListSecretsForAuthenticatedUserResponse200, CodespacesListSecretsForAuthenticatedUserError>
List secrets for the authenticated user
Lists all secrets available for a user’s Codespaces without revealing their
encrypted values.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for list_secrets_for_authenticated_user
List secrets for the authenticated user
Lists all secrets available for a user’s Codespaces without revealing their
encrypted values.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for list_secrets_for_authenticated_user
pub async fn remove_repository_for_secret_for_authenticated_user_async(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesRemoveRepositoryForSecretForAuthenticatedUserError>
pub async fn remove_repository_for_secret_for_authenticated_user_async(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesRemoveRepositoryForSecretForAuthenticatedUserError>
Remove a selected repository from a user secret
Removes a repository from the selected repositories for a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for remove_repository_for_secret_for_authenticated_user
pub fn remove_repository_for_secret_for_authenticated_user(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesRemoveRepositoryForSecretForAuthenticatedUserError>
pub fn remove_repository_for_secret_for_authenticated_user(
&self,
secret_name: &str,
repository_id: i32
) -> Result<(), CodespacesRemoveRepositoryForSecretForAuthenticatedUserError>
Remove a selected repository from a user secret
Removes a repository from the selected repositories for a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for remove_repository_for_secret_for_authenticated_user
pub async fn repo_machines_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
query_params: impl Into<CodespacesRepoMachinesForAuthenticatedUserParams<'api>>
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesRepoMachinesForAuthenticatedUserError>
pub async fn repo_machines_for_authenticated_user_async(
&self,
owner: &str,
repo: &str,
query_params: impl Into<CodespacesRepoMachinesForAuthenticatedUserParams<'api>>
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesRepoMachinesForAuthenticatedUserError>
List available machine types for a repository
List the machine types available for a given repository based on its configuration.
Location is required.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for repo_machines_for_authenticated_user
pub fn repo_machines_for_authenticated_user(
&self,
owner: &str,
repo: &str,
query_params: impl Into<CodespacesRepoMachinesForAuthenticatedUserParams<'api>>
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesRepoMachinesForAuthenticatedUserError>
pub fn repo_machines_for_authenticated_user(
&self,
owner: &str,
repo: &str,
query_params: impl Into<CodespacesRepoMachinesForAuthenticatedUserParams<'api>>
) -> Result<GetCodespacesCodespaceMachinesForAuthenticatedUserResponse200, CodespacesRepoMachinesForAuthenticatedUserError>
List available machine types for a repository
List the machine types available for a given repository based on its configuration.
Location is required.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for repo_machines_for_authenticated_user
pub async fn set_repositories_for_secret_for_authenticated_user_async(
&self,
secret_name: &str,
body: PutCodespacesSetRepositoriesForSecretForAuthenticatedUser
) -> Result<(), CodespacesSetRepositoriesForSecretForAuthenticatedUserError>
pub async fn set_repositories_for_secret_for_authenticated_user_async(
&self,
secret_name: &str,
body: PutCodespacesSetRepositoriesForSecretForAuthenticatedUser
) -> Result<(), CodespacesSetRepositoriesForSecretForAuthenticatedUserError>
Set selected repositories for a user secret
Select the repositories that will use a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for set_repositories_for_secret_for_authenticated_user
pub fn set_repositories_for_secret_for_authenticated_user(
&self,
secret_name: &str,
body: PutCodespacesSetRepositoriesForSecretForAuthenticatedUser
) -> Result<(), CodespacesSetRepositoriesForSecretForAuthenticatedUserError>
pub fn set_repositories_for_secret_for_authenticated_user(
&self,
secret_name: &str,
body: PutCodespacesSetRepositoriesForSecretForAuthenticatedUser
) -> Result<(), CodespacesSetRepositoriesForSecretForAuthenticatedUserError>
Set selected repositories for a user secret
Select the repositories that will use a user’s codespace secret.
You must authenticate using an access token with the user
or read:user
scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub API docs for set_repositories_for_secret_for_authenticated_user
pub async fn start_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStartForAuthenticatedUserError>
pub async fn start_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStartForAuthenticatedUserError>
Start a codespace for the authenticated user
Starts a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for start_for_authenticated_user
pub fn start_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStartForAuthenticatedUserError>
pub fn start_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStartForAuthenticatedUserError>
Start a codespace for the authenticated user
Starts a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for start_for_authenticated_user
pub async fn stop_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStopForAuthenticatedUserError>
pub async fn stop_for_authenticated_user_async(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStopForAuthenticatedUserError>
Stop a codespace for the authenticated user
Stops a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for stop_for_authenticated_user
pub fn stop_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStopForAuthenticatedUserError>
pub fn stop_for_authenticated_user(
&self,
codespace_name: &str
) -> Result<Codespace, CodespacesStopForAuthenticatedUserError>
Stop a codespace for the authenticated user
Stops a user’s codespace.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for stop_for_authenticated_user
pub async fn update_for_authenticated_user_async(
&self,
codespace_name: &str,
body: PatchCodespacesUpdateForAuthenticatedUser
) -> Result<Codespace, CodespacesUpdateForAuthenticatedUserError>
pub async fn update_for_authenticated_user_async(
&self,
codespace_name: &str,
body: PatchCodespacesUpdateForAuthenticatedUser
) -> Result<Codespace, CodespacesUpdateForAuthenticatedUserError>
Update a codespace for the authenticated user
Updates a codespace owned by the authenticated user. Currently only the codespace’s machine type can be modified using this endpoint.
Once you specify a new machine type it will be applied the next time your codespace is started.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for update_for_authenticated_user
pub fn update_for_authenticated_user(
&self,
codespace_name: &str,
body: PatchCodespacesUpdateForAuthenticatedUser
) -> Result<Codespace, CodespacesUpdateForAuthenticatedUserError>
pub fn update_for_authenticated_user(
&self,
codespace_name: &str,
body: PatchCodespacesUpdateForAuthenticatedUser
) -> Result<Codespace, CodespacesUpdateForAuthenticatedUserError>
Update a codespace for the authenticated user
Updates a codespace owned by the authenticated user. Currently only the codespace’s machine type can be modified using this endpoint.
Once you specify a new machine type it will be applied the next time your codespace is started.
You must authenticate using an access token with the codespace
scope to use this endpoint.
GitHub API docs for update_for_authenticated_user