Getting Started
This page will help you get started with the Evenings API.
Last updated
This page will help you get started with the Evenings API.
Last updated
Welcome to the Evenings API! Whether you’re building an application or integrating with our streaming service, this guide will help you get started smoothly. In just a few steps, you'll be ready to interact with the Evenings API to enhance your application with our stations' information.
The Evenings API provides endpoints to retrieve information about stations, tracks, and stream status. Familiarize yourself with the three main endpoints:
GET /v1/streams/{stream}/public
: Get public stream information.
GET /v1/stations/{station}/tracks
: Get a list of tracks for a station.
GET /v1/stations/{station}/status
: Get the status of a station.
Before making requests, you need an API key to authenticate. Follow these steps to authenticate your requests:
Obtain an API key through
Use the Bearer token method for authentication.
Include the API key in the Authorization header like so: Authorization: Bearer YOUR_API_KEY
.
Replace YOUR_API_KEY
with the key you received.
To start interacting with the Evenings API, make a simple GET
request to any of the public endpoints. Here’s how you can make a request to retrieve public stream information:
HTTP
Replace eveningsfm
with the slug of the station you are interested in.
The Evenings API will return responses in JSON format. Ensure your application can parse JSON and handle the data accordingly.
For instance, when fetching station tracks, your application should be prepared to handle an array of track objects, each with details such as title, location, and duration.
Understand and handle errors correctly:
If you receive a 4xx
status code, it often indicates an issue with your request (like a bad request or unauthorized access).
A 5xx
status code indicates a problem on the Evenings API server.
Refer to the HTTP status codes for proper error handling.
Avoid making unnecessary requests; cache responses where possible.
Respect the rate limits to prevent being blocked.
Secure your API key; do not expose it in client-side code.
If you encounter any issues or have questions:
Send a DM to @EVENINGSFM on Twitter.
By following these steps, you should be well on your way to successfully integrating with the Evenings API. Happy coding!
Contact for support via email.