mpd-box
latest
  • Installation
  • Configuration
  • Run
  • Readers
  • API
    • Cheatsheet
    • Full reference
      • Tags related
        • GET /current-tag-id
        • POST /tag/(tag_id)
        • GET /tag/(tag_id)
  • Hardware
  • Frequently asked questions
  • Changelog
mpd-box
  • Docs »
  • API »
  • Tags related
  • Edit on GitHub

Tags related¶

GET /current-tag-id¶

Return id of current tag.

{
        "current-tag-id": "2499F6C5"
}

If no tag selected, return current-tag-id = None.

POST /tag/(tag_id)¶

POST /tag/2499F6C5

JSON is send as content in POST request (and not as parameters).

{
        "id": "2499F6C5",
        "random": true,
        "repeat": true,
        "songs": [
                "Folder/Artist X/Track 2.mp3",
                "Folder/Artist X/Track 7.mp3",
                "Folder/Artist Y/Track 42.mp3",
                ...
        ]
}

Is saved in redis with key tags:(tag_id).

GET /tag/(tag_id)¶

Return description of a tag. Exact same structure as saved in REDIS

GET /tag/2499F6C5

Return JSON structure

{
        "id": "2499F6C5",
        "random": true,
        "repeat": true,
        "songs": [
                "Folder/Artist X/Track 2.mp3",
                "Folder/Artist X/Track 7.mp3",
                "Folder/Artist Y/Track 42.mp3",
                ...
        ]
}

If tag_id is undefined, return 404 error code.

Next Previous

© Copyright 2015, The mpd-box team. Revision b5bdaa06.

Built with Sphinx using a theme provided by Read the Docs.