(repositories)
List repositories.
Scopes: repositories:read
repositories:write
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.repositories.list(organization_id=[
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
])
while res is not None:
# Handle items
res = res.next()
Parameter | Type | Required | Description |
---|---|---|---|
platform |
OptionalNullable[models.QueryParamPlatformFilter] | ➖ | Filter by platform. |
name |
OptionalNullable[models.QueryParamRepositoryNameFilter] | ➖ | Filter by name. |
external_organization_name |
OptionalNullable[models.ExternalOrganizationNameFilter] | ➖ | Filter by external organization name. |
is_private |
OptionalNullable[bool] | ➖ | Filter by private status. |
organization_id |
OptionalNullable[models.QueryParamOrganizationIDFilter] | ➖ | Filter by organization ID. |
page |
Optional[int] | ➖ | Page number, defaults to 1. |
limit |
Optional[int] | ➖ | Size of a page, defaults to 10. Maximum is 100. |
sorting |
List[models.RepositorySortProperty] | ➖ | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.RepositoriesListResponse
Error Type | Status Code | Content Type |
---|---|---|
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Get a repository by ID.
Scopes: repositories:read
repositories:write
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.repositories.get(id="<value>")
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.ResourceNotFound | 404 | application/json |
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Update a repository.
Scopes: repositories:write
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.repositories.update(id="<value>", repository_update={})
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
repository_update |
models.RepositoryUpdate | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.NotPermitted | 403 | application/json |
models.ResourceNotFound | 404 | application/json |
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |