segler-alex/radiobrowser-api

add examples to documentation

Opened this issue · 1 comments

add examples for multiple programming languages to the documentation.
java (android), javascript, c# (windows), python,...

also add tutorial, with basic way of using the api, how it is intended to be used.

Here's a simple Python 3 example for getting the names of all idm stations:

import json
from urllib.request import Request, urlopen

request = Request('http://www.radio-browser.info/webservice/json/stations/bytagexact/idm',
                  data=None,
                  headers={'User-Agent': 'YourAppName'})

response = urlopen(request).read().decode('utf-8')
data = json.loads(response)

for station in data:
    print(station['name'])