View Source ThinNotionApi.Databases (thin_notion_api v1.0.1)

Module for interacting with the Notion Databases.

Link to this section Summary

Functions

Gets a list of Pages contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the request. The response may contain fewer than page_size of results.

Gets a list of Pages contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the request. The response may contain fewer than page_size of results.

Retrieves a Database object using the ID specified.

Updates an existing database as specified by the parameters.

Link to this section Functions

Link to this function

create_database!(parent_id, title, properties \\ %{Name: %{title: %{}}})

View Source
@spec create_database!(String.t(), String.t(), map()) ::
  ThinNotionApi.Types.Response.t()

Gets a list of Pages contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the request. The response may contain fewer than page_size of results.

examples

Examples:

iex> ThinNotionApi.Databases.create_database!("9b4a624d5a18482ab2187e54166edda7", "New Database")
{:ok, %{...}}
Link to this function

query_database(database_id, body_params \\ %{})

View Source

Gets a list of Pages contained in the database, filtered and ordered according to the filter conditions and sort criteria provided in the request. The response may contain fewer than page_size of results.

examples

Examples:

iex> ThinNotionApi.Databases.query_database(database_id)
{:ok, %{...}}

iex> ThinNotionApi.Databases.query_database("a4ef92b2a7984bae82114817678cd2f4", %{ "page_size" => 1})
{:ok, %{...}}
Link to this function

retrieve_database(database_id)

View Source
@spec retrieve_database(String.t()) :: ThinNotionApi.Types.Response.t()

Retrieves a Database object using the ID specified.

examples

Examples

iex> ThinNotionApi.Databases.retrieve_database(database_id)
{:ok, %{...}}
Link to this function

update_database!(database_id, title, properties \\ %{Name: %{title: %{}}})

View Source
@spec update_database!(String.t(), String.t(), map()) ::
  ThinNotionApi.Types.Response.t()

Updates an existing database as specified by the parameters.

examples

Examples:

iex> ThinNotionApi.Databases.update_database!(database_id, "New New Database Name")
{:ok, %{...}}