assets
Accessed as client.repos.releases.assets; the async client mirrors it.
ReposReleasesAssets
The repos.releases.assets namespace.
create
create(
owner: str,
repo: str,
id: int,
*,
name: str | None = None,
attachment: FilePart | None = None,
external_url: str | None = None,
) -> Attachment
Create a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
name
|
str | None
|
name of the attachment |
None
|
attachment
|
FilePart | None
|
attachment to upload (this parameter is incompatible with |
None
|
external_url
|
str | None
|
url to external asset (this parameter is incompatible with |
None
|
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
PayloadTooLargeError
|
|
Operation ID: repoCreateReleaseAttachment
delete
delete(owner: str, repo: str, id: int, attachment_id: int) -> None
Delete a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
attachment_id
|
int
|
id of the attachment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoDeleteReleaseAttachment
get
get(owner: str, repo: str, id: int, attachment_id: int) -> Attachment
Get a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
attachment_id
|
int
|
id of the attachment to get |
required |
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoGetReleaseAttachment
list
list(owner: str, repo: str, id: int) -> list[Attachment]
List release's attachments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
Returns:
| Type | Description |
|---|---|
list[Attachment]
|
AttachmentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoListReleaseAttachments
update
update(
owner: str,
repo: str,
id: int,
attachment_id: int,
*,
browser_download_url: str | None = None,
name: str | None = None,
) -> Attachment
Edit a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
attachment_id
|
int
|
id of the attachment to edit |
required |
browser_download_url
|
str | None
|
(Can only be set if existing attachment is of external type) |
None
|
name
|
str | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
PayloadTooLargeError
|
|
Operation ID: repoEditReleaseAttachment
AsyncReposReleasesAssets
The repos.releases.assets namespace.
create
create(
owner: str,
repo: str,
id: int,
*,
name: str | None = None,
attachment: FilePart | None = None,
external_url: str | None = None,
) -> Attachment
Create a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
name
|
str | None
|
name of the attachment |
None
|
attachment
|
FilePart | None
|
attachment to upload (this parameter is incompatible with |
None
|
external_url
|
str | None
|
url to external asset (this parameter is incompatible with |
None
|
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
PayloadTooLargeError
|
|
Operation ID: repoCreateReleaseAttachment
delete
delete(owner: str, repo: str, id: int, attachment_id: int) -> None
Delete a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
attachment_id
|
int
|
id of the attachment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoDeleteReleaseAttachment
get
get(owner: str, repo: str, id: int, attachment_id: int) -> Attachment
Get a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
attachment_id
|
int
|
id of the attachment to get |
required |
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoGetReleaseAttachment
list
list(owner: str, repo: str, id: int) -> list[Attachment]
List release's attachments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
Returns:
| Type | Description |
|---|---|
list[Attachment]
|
AttachmentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoListReleaseAttachments
update
update(
owner: str,
repo: str,
id: int,
attachment_id: int,
*,
browser_download_url: str | None = None,
name: str | None = None,
) -> Attachment
Edit a release attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the release |
required |
attachment_id
|
int
|
id of the attachment to edit |
required |
browser_download_url
|
str | None
|
(Can only be set if existing attachment is of external type) |
None
|
name
|
str | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
PayloadTooLargeError
|
|
Operation ID: repoEditReleaseAttachment