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

Link to this function

aggregate(enum, bool \\ true)

View Source
@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

Link to this function

id_type(enum, id_type, bool \\ true)

View Source
@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

Link to this function

ids(enum, id_list, bool \\ true)

View Source
@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

Link to this function

interfederates(enum, fedid, bool \\ true)

View Source
@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

Link to this function

protocol(enum, protocol, bool \\ true)

View Source
@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

Link to this function

region(enum, region, bool \\ true)

View Source
@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

Link to this function

structure(enum, structure, bool \\ true)

View Source
@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

Link to this function

sub_region(enum, sub_region, bool \\ true)

View Source
@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

Link to this function

super_region(enum, super_region, bool \\ true)

View Source
@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

Link to this function

tag(enum, tag, bool \\ true)

View Source
@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

Link to this function

type(enum, type, bool \\ true)

View Source
@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