flmmr-api ist eine Ruby on Rails RESTful JSON API für die Mediatheken der deutschen öffentlich-rechtlichen Rundfunkanstalten.
$ git clone [email protected]:eckertj/flmmr-api.git
$ bundle install
$ rake db:setup
$ rake db:update #loads data and fills database
The data can be accessed by passing several url parameters. Currently the following parameters are implemented:
q # query on tv station, title, genre and description, searchterms can be divided by '+'
station # limits response to a specific tv station
after_date # limits response to media that was published after a specific date
before_date # limits response to media that was published before a specific date
min_duration # limits response to media to a minimum duration (in seconds)
max_duration # limits response to media to a maximum duration (in seconds)
limit # limits response to a maximum length
order_least_recent # set order_least_recent=1 the oldest media first
flmmr-api.herokuapp.com/api?q=tatort
{
media: [
{
station: "ARD",
title: "Rechtsmedizin - Hinter den Kulissen",
genre: "",
date: "2015-06-16T00:00:00.000Z",
duration: 300,
description: "Ein Blick hinter die Kulissen der Bonner Rechtsmedizin. In meterlangen Regalen lagern hier Haar- und Blutproben. Und eines wird sofort klar: In den Laboren braucht es viel mehr Geduld als ein Fernsehtatort vermuten lässt.",
media_url: "https://ondemand-ww.wdr.de/medp/fsk0/72/729223/729223_7872044.mp4"
}
]
}
Try it live at flmmr-api.herokuapp.com/api?q=searchterm
!
There is also some sample data in the seeds.rb
that can be commented in so that you can test the API without filling it with real data. Currently, the application was tested only on Ruby 2.3.0.
Mediathekdirekt project: https://gitlab.com/mediathekdirekt/mediathekdirekt
EasyContacts API created for a Ruby Meetup Talk: https://github.com/aomran/api-presentation