View Source Mobilizon.Federation.ActivityPub.Fetcher (Mobilizon v5.0.0-beta.1)

Module to handle direct URL ActivityPub fetches to remote content

If you need to first get cached data, see Mobilizon.Federation.ActivityPub.fetch_object_from_url/2

Summary

Types

@type fetch_actor_errors() ::
  :json_decode_error | :actor_deleted | :http_error | :actor_not_allowed_type

Functions

Link to this function

fetch(url, options \\ [])

View Source
@spec fetch(String.t(), Keyword.t()) ::
  {:ok, map()}
  | {:error,
     :invalid_url
     | :http_gone
     | :http_error
     | :http_not_found
     | :content_not_json}
Link to this function

fetch_and_create(url, options \\ [])

View Source
@spec fetch_and_create(String.t(), Keyword.t()) ::
  {:ok, map(), struct()}
  | {:error, atom()}
  | {:error, Ecto.Changeset.t()}
  | :error
Link to this function

fetch_and_prepare_actor_from_url(url, options \\ [])

View Source

Fetching a remote actor's information through its AP ID

Link to this function

fetch_and_update(url, options \\ [])

View Source
@spec fetch_and_update(String.t(), Keyword.t()) ::
  {:ok, map(), struct()} | {:error, atom()}