assets
Accessed as client.repos.issues.assets; the async client mirrors it.
ReposIssuesAssets
The repos.issues.assets namespace.
create
create(
owner: str,
repo: str,
index: int,
*,
name: str | None = None,
updated_at: datetime | None = None,
attachment: FilePart,
) -> Attachment
Create an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
name
|
str | None
|
name of the attachment |
None
|
updated_at
|
datetime | None
|
time of the attachment's creation. This is a timestamp in RFC 3339 format |
None
|
attachment
|
FilePart
|
attachment to upload |
required |
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
PayloadTooLargeError
|
|
UnprocessableEntityError
|
|
LockedError
|
|
Operation ID: issueCreateIssueAttachment
delete
delete(owner: str, repo: str, index: int, attachment_id: int) -> None
Delete an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
attachment_id
|
int
|
id of the attachment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
LockedError
|
|
Operation ID: issueDeleteIssueAttachment
get
get(owner: str, repo: str, index: int, attachment_id: int) -> Attachment
Get an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
attachment_id
|
int
|
id of the attachment to get |
required |
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: issueGetIssueAttachment
list
list(owner: str, repo: str, index: int) -> list[Attachment]
List issue's attachments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
Returns:
| Type | Description |
|---|---|
list[Attachment]
|
AttachmentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: issueListIssueAttachments
update
update(
owner: str,
repo: str,
index: int,
attachment_id: int,
*,
browser_download_url: str | None = None,
name: str | None = None,
) -> Attachment
Edit an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
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
|
|
LockedError
|
|
Operation ID: issueEditIssueAttachment
AsyncReposIssuesAssets
The repos.issues.assets namespace.
create
create(
owner: str,
repo: str,
index: int,
*,
name: str | None = None,
updated_at: datetime | None = None,
attachment: FilePart,
) -> Attachment
Create an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
name
|
str | None
|
name of the attachment |
None
|
updated_at
|
datetime | None
|
time of the attachment's creation. This is a timestamp in RFC 3339 format |
None
|
attachment
|
FilePart
|
attachment to upload |
required |
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
PayloadTooLargeError
|
|
UnprocessableEntityError
|
|
LockedError
|
|
Operation ID: issueCreateIssueAttachment
delete
delete(owner: str, repo: str, index: int, attachment_id: int) -> None
Delete an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
attachment_id
|
int
|
id of the attachment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
LockedError
|
|
Operation ID: issueDeleteIssueAttachment
get
get(owner: str, repo: str, index: int, attachment_id: int) -> Attachment
Get an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
attachment_id
|
int
|
id of the attachment to get |
required |
Returns:
| Type | Description |
|---|---|
Attachment
|
Attachment. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: issueGetIssueAttachment
list
list(owner: str, repo: str, index: int) -> list[Attachment]
List issue's attachments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
Returns:
| Type | Description |
|---|---|
list[Attachment]
|
AttachmentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: issueListIssueAttachments
update
update(
owner: str,
repo: str,
index: int,
attachment_id: int,
*,
browser_download_url: str | None = None,
name: str | None = None,
) -> Attachment
Edit an issue attachment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
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
|
|
LockedError
|
|
Operation ID: issueEditIssueAttachment