Polyjuice Client v0.3.1 Polyjuice.Client.Filter.Event View Source

Create EventFilters, RoomEventFilters, StateFilters, or RoomFilters.

https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-user-userid-filter

These are filters that form part of a Polyjuice.Client.Filter. Not all of the functions in here may apply to all the different types of filters.

Link to this section Summary

Functions

Add items to a list parameter in the filter.

Set whether to include or exclude events that have a URL.

Exclude certain rooms.

Exclude certain senders.

Exclude certain types of events.

Include certain rooms.

Include certain senders.

Include certain types of events.

Set the maximum number of events to return.

Link to this section Functions

Link to this function

add_to_list(filter \\ %{}, name, data)

View Source
add_to_list(filter :: map(), name :: String.t(), data :: list()) :: map()

Add items to a list parameter in the filter.

Link to this function

contains_url(filter \\ %{}, flag)

View Source
contains_url(filter :: map(), flag :: boolean()) :: map()

Set whether to include or exclude events that have a URL.

If flag is true, only events that have a url field will be included. If flag is false, events that have a url field will be excluded.

Link to this function

exclude_rooms(filter \\ %{}, rooms)

View Source
exclude_rooms(filter :: map(), rooms :: list()) :: map()

Exclude certain rooms.

Link to this function

exclude_senders(filter \\ %{}, senders)

View Source
exclude_senders(filter :: map(), senders :: list()) :: map()

Exclude certain senders.

Link to this function

exclude_types(filter \\ %{}, types)

View Source
exclude_types(filter :: map(), types :: list()) :: map()

Exclude certain types of events.

Link to this function

include_rooms(filter \\ %{}, rooms)

View Source
include_rooms(filter :: map(), rooms :: list()) :: map()

Include certain rooms.

Link to this function

include_senders(filter \\ %{}, senders)

View Source
include_senders(filter :: map(), types :: list()) :: map()

Include certain senders.

Link to this function

include_types(filter \\ %{}, types)

View Source
include_types(filter :: map(), types :: list()) :: map()

Include certain types of events.

Link to this function

limit(filter \\ %{}, limit)

View Source
limit(filter :: map(), limit :: integer()) :: map()

Set the maximum number of events to return.