OpenApiTypesense.Presets (OpenApiTypesense v0.6.5)

View Source

Provides API endpoints related to presets

Summary

Functions

delete_preset(presetId)

@spec delete_preset(String.t()) ::
  {:ok, OpenApiTypesense.PresetDeleteSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Delete a preset.

Permanently deletes a preset, given it's name.

delete_preset(presetId, opts)

Either one of:

  • delete_preset(presetId, opts)
  • delete_preset(%{api_key: xyz, host: ...}, presetId)
  • delete_preset(Connection.new(), presetId)

delete_preset(conn, presetId, opts)

Either one of:

  • delete_preset(%{api_key: xyz, host: ...}, presetId, opts)
  • delete_preset(Connection.new(), presetId, opts)

retrieve_all_presets()

@spec retrieve_all_presets() ::
  {:ok, OpenApiTypesense.PresetsRetrieveSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Retrieves all presets.

Retrieve the details of all presets

retrieve_all_presets(opts)

Either one of:

  • retrieve_all_presets(opts)
  • retrieve_all_presets(%{api_key: xyz, host: ...})
  • retrieve_all_presets(Connection.new())

retrieve_all_presets(conn, opts)

Either one of:

  • retrieve_all_presets(%{api_key: xyz, host: ...}, opts)
  • retrieve_all_presets(Connection.new(), opts)

retrieve_preset(presetId)

@spec retrieve_preset(String.t()) ::
  {:ok, OpenApiTypesense.PresetSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Retrieves a preset.

Retrieve the details of a preset, given it's name.

retrieve_preset(presetId, opts)

Either one of:

  • retrieve_preset(presetId, opts)
  • retrieve_preset(%{api_key: xyz, host: ...}, presetId)
  • retrieve_preset(Connection.new(), presetId)

retrieve_preset(conn, presetId, opts)

Either one of:

  • retrieve_preset(%{api_key: xyz, host: ...}, presetId, opts)
  • retrieve_preset(Connection.new(), presetId, opts)

upsert_preset(presetId, body)

@spec upsert_preset(String.t(), map()) ::
  {:ok, OpenApiTypesense.PresetSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Upserts a preset.

Create or update an existing preset.

upsert_preset(presetId, body, opts)

@spec upsert_preset(
  map() | OpenApiTypesense.Connection.t() | String.t(),
  String.t() | map(),
  map() | keyword()
) ::
  {:ok, OpenApiTypesense.PresetSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • upsert_preset(presetId, payload, opts)
  • upsert_preset(%{api_key: xyz, host: ...}, presetId, payload)
  • upsert_preset(Connection.new(), presetId, payload)

upsert_preset(conn, presetId, body, opts)

Either one of:

  • upsert_preset(%{api_key: xyz, host: ...}, presetId, payload, opts)
  • upsert_preset(Connection.new(), presetId, payload, opts)