API referenceresources

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

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

list()

list() -> Any

List 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

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

retrieve()

retrieve() -> Any

Read the current project's features.

Returns

  • Any: The project's features.

update()

update(features: list[Any]) -> Any

Replace the current project's features.

Parameters

NameTypeDefaultDescription
featureslist[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

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

list()

list(query: QueryParams | None = None) -> Page[Any]

List the project's members.

Parameters

NameTypeDefaultDescription
queryQueryParams | NoneNoneOptional 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) -> Any

Invite a member to the project.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe invitation as the API takes it.

Returns

  • Any: The created membership.

update()

update(membership_id: str, body: JsonObject) -> Any

Update a membership.

Parameters

NameTypeDefaultDescription
membership_idstrThe membership ID.
bodyJsonObjectThe fields to change.

Returns

  • Any: The updated membership.

remove()

remove(membership_id: str) -> Any

Remove a member from the project.

Parameters

NameTypeDefaultDescription
membership_idstrThe 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

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

retrieve()

retrieve() -> Any

Read the project's settings.

Returns

  • Any: The settings.

update()

update(key: str, enabled: bool) -> Any

Turn an on/off setting on or off.

Parameters

NameTypeDefaultDescription
keystrThe setting key.
enabledboolThe new state.

Returns

  • Any: The updated setting.

update_text()

update_text(key: str, value: str | None) -> Any

Set or clear a text setting.

Parameters

NameTypeDefaultDescription
keystrThe setting key.
valuestr | NoneThe 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

NameTypeDefaultDescription
queryQueryParams | NoneNoneOptional 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

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

retrieve()

retrieve() -> Any

Read the project's locales.

Returns

  • Any: The locales.

update()

update(locales: JsonObject) -> Any

Update the project's locales.

Parameters

NameTypeDefaultDescription
localesJsonObjectThe locale fields to change.

Returns

  • Any: The updated locales.

I18nextResource

I18nextResource(http: HttpClient)

Localizations as i18next documents; access it as ovok.localizations.i18next.

Parameters

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

retrieve()

retrieve(language: str) -> Any

Read a language's localizations as one i18next document.

Parameters

NameTypeDefaultDescription
languagestrThe language code, such as "en".

Returns

  • Any: The i18next document.

update()

update(language: str, document: JsonObject) -> None

Update a language's localizations from an i18next document.

Parameters

NameTypeDefaultDescription
languagestrThe language code.
documentJsonObjectThe 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) -> Any

List a language's localization entries.

Parameters

NameTypeDefaultDescription
languagestrThe language code.
queryQueryParams | NoneNoneOptional query parameters passed to the API.

Returns

  • Any: The entries.

retrieve()

retrieve(language: str, key: str) -> Any

Read one localization entry.

Parameters

NameTypeDefaultDescription
languagestrThe language code.
keystrThe entry key.

Returns

  • Any: The entry.

update()

update(language: str, key: str, body: JsonObject) -> Any

Create or replace one localization entry.

Parameters

NameTypeDefaultDescription
languagestrThe language code.
keystrThe entry key.
bodyJsonObjectThe entry as the API takes it.

Returns

  • Any: The stored entry.

delete()

delete(language: str, key: str) -> None

Delete one localization entry.

Parameters

NameTypeDefaultDescription
languagestrThe language code.
keystrThe entry key.

EmailTemplatesResource

EmailTemplatesResource(http: HttpClient)

The project's email templates; access it as ovok.email.templates.

Parameters

NameTypeDefaultDescription
httpHttpClientThe client's HTTP client.

list()

list() -> Any

List 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

On this page