Skip to content

Commit

Permalink
Docu for /decodetrack & /decodetracks (#477)
Browse files Browse the repository at this point in the history
* added /decodetrack & /decodetracks

* Update IMPLEMENTATION.md

* fixed code blocks

* fixed http method

Co-authored-by: Freya Arbjerg <fred@frederikam.com>

* fixed wording

Co-authored-by: Freya Arbjerg <fred@frederikam.com>

Co-authored-by: Freya Arbjerg <fred@frederikam.com>
  • Loading branch information
topi314 and freyacodes committed Apr 19, 2021
1 parent fddac16 commit 418c120
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,66 @@ A severity level of `COMMON` indicates that the error is non-fatal and that the
}
```

### Track Decoding API

Decode a single track into its info
```
GET /decodetrack?track=QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA== HTTP/1.1
Host: localhost:8080
Authorization: youshallnotpass
```

Response:
```json
{
"track": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==",
"info": {
"identifier": "dQw4w9WgXcQ",
"isSeekable": true,
"author": "RickAstleyVEVO",
"length": 212000,
"isStream": false,
"position": 0,
"title": "Rick Astley - Never Gonna Give You Up",
"uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
}
```

Decode multiple tracks into info their info
```
POST /decodetracks HTTP/1.1
Host: localhost:8080
Authorization: youshallnotpass
```

Request:
```json
[
"QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==",
...
]
```

Response:
```json
[
{
"track": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==",
"info": {
"identifier": "dQw4w9WgXcQ",
"isSeekable": true,
"author": "RickAstleyVEVO",
"length": 212000,
"isStream": false,
"position": 0,
"title": "Rick Astley - Never Gonna Give You Up",
"uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
},
...
]
```
---

### RoutePlanner API
Expand Down

0 comments on commit 418c120

Please sign in to comment.