README.md

[![coverage report](https://gricad-gitlab.univ-grenoble-alpes.fr/OSUG/RESIF/fdsn_plugs/badges/main/coverage.svg)](https://gricad-gitlab.univ-grenoble-alpes.fr/OSUG/RESIF/fdsn_plugs/-/commits/main)

# FdsnPlugs

Collection of plugs related to FDSN webservices.

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `fdsn_plugs` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:fdsn_plugs, "~> 0.6.0"}
  ]
end
```

## Usage

This module provides two supersets of plugs : FdsnDataselectPlugs and FdsnAvailabilityPlugs useful to implement respectively dataselect and availability webservices.

### Phoenix

Add the plug collection of your services in your plugs pipeline:

``` elixir
    pipeline :fdsn do
        plug :accepts, ["json", "text", "mseed"]
        plug FdsnDataselectPlugs
    end
```