Trafikkflyt – API usage

logo_betaAfter speaking briefly with a co-worker earlier today about the service that the radio channel P4 (Norwegian) offers, I decided to make a Java framework that can easily be used to get the information from this service. Shortly told, this service is continously updated with traffic news – roads blocked and other information that is important to people on the road.

The framework works in the manner that you can either get all the current events, or limit it to an area of your choice. The area codes you can use is defined in the source code – and can also be found on the developer page for Trafikkflyt. You find that page by browsing to the bottom of the main page, and click the «For Utviklere» link.

The framework will grab the following fields and create elements for each:

  1. Title of the event
  2. Link to the event (Trafikkflyt)
  3. Published date
  4. Published date (date object)
  5. Published date (formatted)
  6. Latitude
  7. Longitude
  8. Google maps generated link

The source also comes with a test program that can be used to test the output.

IMPORTANT

Make sure you read and understand the terms of usage before implementing this framework into your projects. You can also grab a copy of the API to better understand the possibillities.

Check the service providers webpage (Norwegian)

Brudvik.org