ovok_sdk.resources.platform
Platform administration: accounts, projects, locales, localizations and email templates.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.25+2ba84b0
Platform administration: accounts, projects, locales, localizations and email templates.
AccountsResource
AccountsResource(http: HttpClient)The signed-in user's accounts; access it as ovok.accounts.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
list()
list() -> AnyList the accounts the signed-in user can access.
Returns
Any: The accounts.
ProjectFeaturesResource
ProjectFeaturesResource(http: HttpClient)The current project's features; access it as ovok.projects.features.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
retrieve()
retrieve() -> AnyRead the current project's features.
Returns
Any: The project's features.
update()
update(features: list[Any]) -> AnyReplace the current project's features.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
features | list[Any] | The full feature list. |
Returns
Any: The updated features.
ProjectMembersResource
ProjectMembersResource(http: HttpClient)Members of the current project; access it as ovok.projects.members.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
list()
list(query: QueryParams | None = None) -> Page[Any]List the project's members.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
query | QueryParams | None | None | Optional query parameters; page is the 0-based first page. |
Returns
Page[Any]: A page of memberships that loads later pages on demand.
invite()
invite(body: JsonObject) -> AnyInvite a member to the project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The invitation as the API takes it. |
Returns
Any: The created membership.
update()
update(membership_id: str, body: JsonObject) -> AnyUpdate a membership.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
membership_id | str | The membership ID. | |
body | JsonObject | The fields to change. |
Returns
Any: The updated membership.
remove()
remove(membership_id: str) -> AnyRemove a member from the project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
membership_id | str | The membership ID. |
Returns
Any: The API's delete response.
ProjectSettingsResource
ProjectSettingsResource(http: HttpClient)The current project's settings; access it as ovok.projects.settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
retrieve()
retrieve() -> AnyRead the project's settings.
Returns
Any: The settings.
update()
update(key: str, enabled: bool) -> AnyTurn an on/off setting on or off.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | str | The setting key. | |
enabled | bool | The new state. |
Returns
Any: The updated setting.
update_text()
update_text(key: str, value: str | None) -> AnySet or clear a text setting.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | str | The setting key. | |
value | str | None | The new value, or None to clear it. |
Returns
Any: The updated setting.
ProjectsResource
ProjectsResource(http: HttpClient)Administered projects, and the current project's members, features and settings.
Created by Ovok; access it as ovok.projects.
list()
list(query: QueryParams | None = None) -> Page[Any]List the projects the signed-in user administers.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
query | QueryParams | None | None | Optional query parameters; page is the 0-based first page. |
Returns
Page[Any]: A page of projects that loads later pages on demand.
LocalesResource
LocalesResource(http: HttpClient)The project's enabled locales; access it as ovok.locales.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
retrieve()
retrieve() -> AnyRead the project's locales.
Returns
Any: The locales.
update()
update(locales: JsonObject) -> AnyUpdate the project's locales.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
locales | JsonObject | The locale fields to change. |
Returns
Any: The updated locales.
I18nextResource
I18nextResource(http: HttpClient)Localizations as i18next documents; access it as ovok.localizations.i18next.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
retrieve()
retrieve(language: str) -> AnyRead a language's localizations as one i18next document.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
language | str | The language code, such as "en". |
Returns
Any: The i18next document.
update()
update(language: str, document: JsonObject) -> NoneUpdate a language's localizations from an i18next document.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
language | str | The language code. | |
document | JsonObject | The i18next document. |
LocalizationsResource
LocalizationsResource(http: HttpClient)The project's localization entries by language and key.
Created by Ovok; access it as ovok.localizations.
list()
list(language: str, query: QueryParams | None = None) -> AnyList a language's localization entries.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
language | str | The language code. | |
query | QueryParams | None | None | Optional query parameters passed to the API. |
Returns
Any: The entries.
retrieve()
retrieve(language: str, key: str) -> AnyRead one localization entry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
language | str | The language code. | |
key | str | The entry key. |
Returns
Any: The entry.
update()
update(language: str, key: str, body: JsonObject) -> AnyCreate or replace one localization entry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
language | str | The language code. | |
key | str | The entry key. | |
body | JsonObject | The entry as the API takes it. |
Returns
Any: The stored entry.
delete()
delete(language: str, key: str) -> NoneDelete one localization entry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
language | str | The language code. | |
key | str | The entry key. |
EmailTemplatesResource
EmailTemplatesResource(http: HttpClient)The project's email templates; access it as ovok.email.templates.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
list()
list() -> AnyList the project's email templates.
Returns
Any: The templates.
EmailResource
EmailResource(http: HttpClient)Project email settings.
Created by Ovok; access it as ovok.email.
Last updated on