IndieWeb v0.0.29 IndieWeb.Webmention

Handles Webmention interoperability for a site.

Link to this section Summary

Functions

Sends out a Webmention to the provided endpoint for target from source

Finds the Webmention endpoint of the provided URI

Parses properties of an incoming Webmention

Sends a Webmention to the provided URI

Defines the adpater to use to resolve URI and source content

Link to this section Functions

Link to this function

direct_send!(endpoint, target_url, source)

Sends out a Webmention to the provided endpoint for target from source.

Link to this function

discover_endpoint(page_url)
discover_endpoint(binary()) :: {:ok, binary()} | {:error, any()}

Finds the Webmention endpoint of the provided URI.

This employs the Webmention endpoint discovery algorithm to find the proper endpoint to send Webmentions for the URI in question.

TODO: Add User-Agent information (by allowing to pass in header options)

Link to this function

receive(args)
receive(map()) :: {:ok, [action: atom(), args: map()]} | {:error, any()}

Parses properties of an incoming Webmention.

This aims to resolve the target of an incoming Webmention and determine if there's a valid action to take from it.

Link to this function

resolve_source_url(source)

Link to this function

resolve_target_from_url(target_url)

Link to this function

send(target_url, source)
send(binary(), any()) ::
  {:ok, IndieWeb.Webmention.SendResponse.t()} | {:error, any()}
send(binary(), any()) ::
  {:ok, IndieWeb.Webmention.SendResponse.t()} | {:error, any()}

Sends a Webmention to the provided URI.

This determines the endpoint to send Webmentions to (using discover_endpoint/1) and sends the request using the HTTP client provided.

Defines the adpater to use to resolve URI and source content.