variables
Accessed as client.user.actions.variables; the async client mirrors it.
UserActionsVariables
The user.actions.variables namespace.
create
create(variablename: str, *, value: str) -> None
Create a user-level variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
value
|
str
|
Value of the variable to create. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained. |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: createUserVariable
delete
delete(variablename: str) -> None
Delete a user-level variable which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: deleteUserVariable
get
get(variablename: str) -> ActionVariable
Get a user-level variable which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
Returns:
| Type | Description |
|---|---|
ActionVariable
|
ActionVariable. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: getUserVariable
list
list(*, page: int | None = None, limit: int | None = None) -> Paginated[ActionVariable]
Get the user-level list of variables which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page
|
int | None
|
1-based page to start iteration at. |
None
|
limit
|
int | None
|
Page size; the instance caps it server-side. |
None
|
Returns:
| Type | Description |
|---|---|
Paginated[ActionVariable]
|
VariableList. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: getUserVariablesList
update
update(variablename: str, *, name: str | None = None, value: str) -> None
Update a user-level variable which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
name
|
str | None
|
New name for the variable. If the field is empty, the variable name won't be updated. Forgejo will convert it to uppercase. |
None
|
value
|
str
|
Value of the variable to update. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained. |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: updateUserVariable
AsyncUserActionsVariables
The user.actions.variables namespace.
create
create(variablename: str, *, value: str) -> None
Create a user-level variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
value
|
str
|
Value of the variable to create. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained. |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: createUserVariable
delete
delete(variablename: str) -> None
Delete a user-level variable which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: deleteUserVariable
get
get(variablename: str) -> ActionVariable
Get a user-level variable which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
Returns:
| Type | Description |
|---|---|
ActionVariable
|
ActionVariable. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: getUserVariable
list
list(*, page: int | None = None, limit: int | None = None) -> AsyncPaginated[ActionVariable]
Get the user-level list of variables which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page
|
int | None
|
1-based page to start iteration at. |
None
|
limit
|
int | None
|
Page size; the instance caps it server-side. |
None
|
Returns:
| Type | Description |
|---|---|
AsyncPaginated[ActionVariable]
|
VariableList. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: getUserVariablesList
update
update(variablename: str, *, name: str | None = None, value: str) -> None
Update a user-level variable which is created by current doer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variablename
|
str
|
name of the variable |
required |
name
|
str | None
|
New name for the variable. If the field is empty, the variable name won't be updated. Forgejo will convert it to uppercase. |
None
|
value
|
str
|
Value of the variable to update. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained. |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
UnauthorizedError
|
|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: updateUserVariable