SmeeFeds.Filter (SmeeFeds v0.1.1) View Source

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/3 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.

Link to this section Summary

Functions

Filter a list of stream of federations so that only those in the EU remain.

Filter a list of stream of federations so that only those in the specified region remain.

Filter a list of stream of federations so that only those in the specified sub_region remain.

Filter a list of stream of federations so that only those in the specified super_region remain.

Link to this section Functions

Specs

eu(enum :: Enumerable.t(), bool :: boolean()) :: Enumerable.t()

Filter a list of stream of federations so that only those in the EU remain.

The filter is positive by default but can be inverted by specifying false

Link to this function

region(enum, region, bool \\ true)

View Source

Specs

region(enum :: Enumerable.t(), region :: binary(), bool :: boolean()) ::
  Enumerable.t()

Filter a list of 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

Link to this function

sub_region(enum, sub_region, bool \\ true)

View Source

Specs

sub_region(enum :: Enumerable.t(), sub_region :: binary(), bool :: boolean()) ::
  Enumerable.t()

Filter a list of 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

Link to this function

super_region(enum, super_region, bool \\ true)

View Source

Specs

super_region(
  enum :: Enumerable.t(),
  super_region :: binary(),
  bool :: boolean()
) ::
  Enumerable.t()

Filter a list of 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