Skip to content

More structured response for /now-playing endpoint #32

@jjst

Description

@jjst

Currently it returns this: https://github.com/jjst/now-playing/blob/main/api/openapi/spec.yaml#L186

I'm thinking something more akin to:

{
  "metadata": {
    "success": true,
    "aggregator": {
      "module_name": "",
      "params" {}
  },
  "item": {
    "type": "song",
    "title: "The Final Countdown",
    "artist": "Europe",
    "start_time": "",
    "end_time": ""
  }
}

or for a programme

{
  "metadata": {
    "success": true,
    "aggregator": {
      "module_name": "",
      "params" {}
  },
  "item": {
    "type": "programme",
    "name: "La Marche De L'Histoire",
    "start_time": "",
    "end_time": ""
    "episode_name": "Le Congrès d'Epinay du PS il y a un demi-siècle" 
    "episode_number": 966
  }
}

start_time and end_time optional fields, full dates with timezone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions