Filters.Filter (filters v0.1.1)

Struct used to recevive responses from HTTP servers

Link to this section Summary

Types

Use this to filter out data past the date expressed in the filter value.

Use this to filter out data exceeding the date expressed in the filter value.

Expresses a date formatted as "yyyy-mm-dd"

Use this for exact matching across a list of well known (and limited amount of) items.

t()

Matches any sub token at any point in the string value, E.g. "The white rabbit" data matches "te rab" text filter value

Link to this section Types

@type date_from() :: :date_from

Use this to filter out data past the date expressed in the filter value.

@type date_to() :: :date_to

Use this to filter out data exceeding the date expressed in the filter value.

Link to this type

date_value()

@type date_value() :: String.t()

Expresses a date formatted as "yyyy-mm-dd"

@type enum() :: :enum

Use this for exact matching across a list of well known (and limited amount of) items.

Link to this type

filter_type()

@type filter_type() :: text() | enum() | date_from() | date_to()
@type key() :: atom() | String.t()
@type t() :: %Filters.Filter{
  filter_type: filter_type(),
  key: key(),
  value: value_type()
}
@type text() :: :text

Matches any sub token at any point in the string value, E.g. "The white rabbit" data matches "te rab" text filter value

Link to this type

value_type()

@type value_type() :: String.t() | date_value()

Link to this section Functions

Link to this function

equals(filter1, filter2)

Link to this function

match(data_item, filter)

Link to this function

new(t, k, v \\ nil)

Link to this function

normalize(date)

Link to this function

tmatch(data_item, f)