View Source SmeeFeds.Filter (SmeeFeds v0.3.1)
Processes a list or stream of federations to include or exclude federation structs matching the specified criteria.
By default these functions include matching federations and exclude those that do not match, but this an be reversed.
For example, by default SmeeFeds.Filter.eu/2
will exclude entities that are not in the EU, but by specifying false
as the third
parameter the filter will be inverted and exclude entities that are in the EU.
Summary
Functions
Filter a list or stream of federations by whether they provide a metadata aggregate
Filter a list or stream of federations so that only those in the EU remain.
Filter a list or stream of federations so that only those with an ID of the specified type remain.
Filter a list or stream of federations so that only those with matching IDs remain
Filter a list or stream of federations by upstream federation
Filter a list or stream of federations by whether or not they provice an MDQ service
Filter a list or stream of federations by federation protocol
Filter a list or stream of federations so that only those in the specified region remain.
Filter a list or stream of federations by federation structure
Filter a list or stream of federations so that only those in the specified sub_region remain.
Filter a list or stream of federations so that only those in the specified super_region remain.
Filter a list or stream of federations by federation tag
Filter a list or stream of federations by federation type
Functions
@spec aggregate(enum :: Enumerable.t(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by whether they provide a metadata aggregate
The filter is positive by default but can be inverted by specifying false
@spec eu(enum :: Enumerable.t(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations so that only those in the EU remain.
The filter is positive by default but can be inverted by specifying false
@spec id_type(enum :: Enumerable.t(), id_type :: atom(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations so that only those with an ID of the specified type remain.
The filter is positive by default but can be inverted by specifying false
@spec ids(enum :: Enumerable.t(), id_list :: [atom()], bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations so that only those with matching IDs remain
The filter is positive by default but can be inverted by specifying false
@spec interfederates(enum :: Enumerable.t(), fedid :: atom(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by upstream federation
Specify the upstream federation by passing its ID as an atom.
The filter is positive by default but can be inverted by specifying false
@spec mdq(enum :: Enumerable.t(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by whether or not they provice an MDQ service
The filter is positive by default but can be inverted by specifying false
@spec protocol(enum :: Enumerable.t(), protocol :: atom(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by federation protocol
The filter is positive by default but can be inverted by specifying false
@spec region(enum :: Enumerable.t(), region :: binary(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations so that only those in the specified region remain.
The list of available regions can be seen by calling SmeeFeds.regions()
The filter is positive by default but can be inverted by specifying false
@spec structure(enum :: Enumerable.t(), structure :: atom(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by federation structure
The filter is positive by default but can be inverted by specifying false
@spec sub_region(enum :: Enumerable.t(), sub_region :: binary(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations so that only those in the specified sub_region remain.
The list of available regions can be seen by calling SmeeFeds.sub_regions()
The filter is positive by default but can be inverted by specifying false
@spec super_region( enum :: Enumerable.t(), super_region :: binary(), bool :: boolean() ) :: Enumerable.t()
Filter a list or stream of federations so that only those in the specified super_region remain.
The list of available regions can be seen by calling SmeeFeds.super_regions()
The filter is positive by default but can be inverted by specifying false
@spec tag(enum :: Enumerable.t(), tag :: binary(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by federation tag
The filter is positive by default but can be inverted by specifying false
@spec type(enum :: Enumerable.t(), type :: atom(), bool :: boolean()) :: Enumerable.t()
Filter a list or stream of federations by federation type
The filter is positive by default but can be inverted by specifying false