View Source ElasticsearchEx.Api.Utils (Elasticsearch_ex v0.6.0)

Provides some helpers to make the HTTP calls easier by extracting and manipulating options.

Summary

Functions

Extracts from the opts the index and the other options.

Extracts from the opts the index and the other options.

Extracts from the opts, the key index and id.

Extracts from the opts, the key index and id.

Takes all the items of the list and merge to a valid URL.

Types

Functions

Link to this function

extract_optional_index(opts, default_index \\ nil)

View Source
@spec extract_optional_index(opts(), nil | index()) :: {nil | index(), opts()}

Extracts from the opts the index and the other options.

Link to this function

extract_required_index!(opts)

View Source
@spec extract_required_index!(opts()) :: {index(), opts()}

Extracts from the opts the index and the other options.

Raises an exception if the option index is missing.

Link to this function

extract_required_index_and_optional_id!(opts)

View Source
@spec extract_required_index_and_optional_id!(opts()) :: {index(), nil | id(), opts()}

Extracts from the opts, the key index and id.

Raises an exception if the index key is missing.

Link to this function

extract_required_index_and_required_id!(opts)

View Source
@spec extract_required_index_and_required_id!(opts()) :: {index(), id(), opts()}

Extracts from the opts, the key index and id.

Raises an exception if the index or the id keys are missing.

@spec merge_path_items([nil | atom() | binary()]) :: binary()

Takes all the items of the list and merge to a valid URL.

Removes the nil values and add a leading /.