Avy.Datasource (avy v1.1.37)

Copy Markdown View Source

A Datasource is the structure that correspond to the output of the webservice. It is generated by a request in Avy.Repo and manipulated after that in order to produce the expected output

Summary

Functions

For a given content, remove timespans outside of scope and trim the one that intersect

Types

t()

@type t() :: %Avy.Datasource{
  channel: String.t(),
  earliest: DateTime.t(),
  latest: DateTime.t(),
  location: String.t(),
  network: String.t(),
  quality: String.t(),
  restriction: String.t(),
  samplerate: float(),
  station: String.t(),
  timespancount: integer(),
  timespans: [map()],
  updated: DateTime.t()
}

Functions

trim_timespans(ds)

@spec trim_timespans(t()) :: t()

For a given content, remove timespans outside of scope and trim the one that intersect