View Source ROR.Filter (ROR v0.1.0)
A structure for building simple ROR Filter strings
Summary
Functions
Creates a new Filter struct from a map or keyword list.
Converts a Filter struct to a ROR filter string
Types
Functions
Creates a new Filter struct from a map or keyword list.
Keys that can be passed are: :status
, :types
, :country_code
, :country_name
, :continent_code
, :continent_name
and also :type
, which is corrected to :types
.
Passing an existing Filter struct returns the same struct
Example
iex> ROR.Filter.new(types: "funder", country_code: "DE")
%ROR.Filter{
status: nil,
types: "funder",
country_code: "DE",
country_name: nil,
continent_code: nil,
continent_name: nil
}
Converts a Filter struct to a ROR filter string
Example
iex> ROR.Filter.new(types: "funder", country_code: "DE")
...> |> ROR.Filter.to_ror_param()
"types:funder,locations.geonames_details.country_code:DE"