# Webmentions

A [Webmention]( module for Elixir.

## Installation

This package is [available in Hex](

1. Add webmentions to your list of dependencies in `mix.exs`:

   def deps do
     [{:webmentions, "~> 1.0.0"}]

## Usage

Just call `Webmentions.send_webmentions("")` where
the URL is the URL of the source document:


This will give you either

{:ok, [%Webmentions.Response{}]}

where the list contains a list of response structures for each endpoint we sent a webmention to or

{:error, reason}

If you already know the list of URL mentions, you can skip parsing the
source URL and send webmentions to all destinations URL (if they support it):

    destinations = ["", ""]
    Webmentions.send_webmentions_for_urls("", destinations)

It will behave as `Webmentions.send_webmentions/2` does.

## Dependencies

We need [Floki]( for HTML parsing and
[Tesla]( for HTTP communication.