The communities an account can post into.
Summary
Functions
Links a community to the account by its platform id.
Same as add/3, but raises FoPost.Error.
The communities linked to an account.
Same as list/2, but raises FoPost.Error.
Unlinks a community.
Same as remove/3, but raises FoPost.Error.
Looks a community up on the platform without linking it.
Same as search/3, but raises FoPost.Error.
Pulls the account's communities from the platform and stores them.
Same as sync/2, but raises FoPost.Error.
Functions
@spec add(FoPost.Client.t(), String.t(), keyword()) :: {:ok, FoPost.Community.t()} | {:error, FoPost.Error.t()}
Links a community to the account by its platform id.
For the case where neither search/3 nor sync/2 surfaces it. Required:
:community_id. Optional: :name.
Same as add/3, but raises FoPost.Error.
@spec list(FoPost.Client.t(), String.t()) :: {:ok, [FoPost.Community.t()]} | {:error, FoPost.Error.t()}
The communities linked to an account.
Same as list/2, but raises FoPost.Error.
@spec remove(FoPost.Client.t(), String.t(), String.t() | integer()) :: {:ok, FoPost.Message.t()} | {:error, FoPost.Error.t()}
Unlinks a community.
community_id is the :id of a FoPost.Community, the local row id — not the
platform's own community id.
Same as remove/3, but raises FoPost.Error.
@spec search(FoPost.Client.t(), String.t(), String.t()) :: {:ok, [FoPost.CommunitySearchResult.t()]} | {:error, FoPost.Error.t()}
Looks a community up on the platform without linking it.
Same as search/3, but raises FoPost.Error.
@spec sync(FoPost.Client.t(), String.t()) :: {:ok, [FoPost.Community.t()]} | {:error, FoPost.Error.t()}
Pulls the account's communities from the platform and stores them.
Same as sync/2, but raises FoPost.Error.