Hello SR open API!

P1radio

I’m totally addicted to Sweden’s public service radio, especially the SR P1 channel that is almost always flowing from our speakers at home. Programs that I miss, I catch up with via the excellent collection of SR podcasts.

When I recently decided to refresh my knowledge in AngularJS, I was looking for a ready-to-use backend for my front-end experiments. It turned out that Swedish Radio has a very nice REST API that is free to use! There is documentation available and also a forum.

My first test was to fetch all radio channels’ meta data, list the channels and their logotypes and provide links to the live broadcast url:s. You can view my published experiment in Plunker here:

http://run.plnkr.co/plunks/ogfyjJ/

It should look something like this:

screenshot_srplayer

There are three radio buttons that you can use to filter among different types of channels. About the code, there is not much needed in the controller:

And then, to display the data in the view:


					
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: