mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
606 lines
12 KiB
JSON
606 lines
12 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "98472441-3ca2-4aba-9148-81f8d1a61b16",
|
|
"name": "Maloja",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "Scrobble Native",
|
|
"item": [
|
|
{
|
|
"name": "Query String",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": []
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/mlj_1/newscrobble?key={{api_key}}&artist={{example_artist}}&title={{example_song}}",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"mlj_1",
|
|
"newscrobble"
|
|
],
|
|
"query": [
|
|
{
|
|
"key": "key",
|
|
"value": "{{api_key}}"
|
|
},
|
|
{
|
|
"key": "artist",
|
|
"value": "{{example_artist}}"
|
|
},
|
|
{
|
|
"key": "title",
|
|
"value": "{{example_song}}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Query String Redirect",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/api/newscrobble?key={{api_key}}&artist={{example_artist}}&title={{example_song}}",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"newscrobble"
|
|
],
|
|
"query": [
|
|
{
|
|
"key": "key",
|
|
"value": "{{api_key}}"
|
|
},
|
|
{
|
|
"key": "artist",
|
|
"value": "{{example_artist}}"
|
|
},
|
|
{
|
|
"key": "title",
|
|
"value": "{{example_song}}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Formdata",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "key",
|
|
"value": "{{api_key}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "artist",
|
|
"value": "{{example_artist}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "title",
|
|
"value": "{{example_song}}",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/mlj_1/newscrobble",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"mlj_1",
|
|
"newscrobble"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Formdata Redirect",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "key",
|
|
"value": "{{api_key}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "artist",
|
|
"value": "{{example_artist}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "title",
|
|
"value": "{{example_song}}",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/api/newscrobble",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"newscrobble"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "JSON",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"key\": \"{{api_key}}\",\n \"artist\": \"{{example_artist}}\",\n \"title\": \"{{example_song}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/mlj_1/newscrobble",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"mlj_1",
|
|
"newscrobble"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "JSON Redirect",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"type": "text",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"key\": \"{{api_key}}\",\n \"artist\": \"{{example_artist}}\",\n \"title\": \"{{example_song}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/api/newscrobble",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"newscrobble"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Scrobble Listenbrainz",
|
|
"item": [
|
|
{
|
|
"name": "JSON",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "token {{api_key}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"listen_type\":\"single\",\n\t\"payload\":[\n\t\t{\n\t\t\t\"track_metadata\":{\n\t\t\t\t\"artist_name\":\"{{example_artist}}\",\n\t\t\t\t\"track_name\":\"{{example_song}}\"\n\t\t\t}\n\t\t}\n\t]\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/listenbrainz/1/submit-listens",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"listenbrainz",
|
|
"1",
|
|
"submit-listens"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "JSON Redirect",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"type": "text",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"type": "text",
|
|
"value": "token {{api_key}}"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"listen_type\":\"single\",\n\t\"payload\":[\n\t\t{\n\t\t\t\"track_metadata\":{\n\t\t\t\t\"artist_name\":\"{{example_artist}}\",\n\t\t\t\t\"track_name\":\"{{example_song}}\"\n\t\t\t}\n\t\t}\n\t]\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/api/s/listenbrainz/1/submit-listens",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"s",
|
|
"listenbrainz",
|
|
"1",
|
|
"submit-listens"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Scrobble Audioscrobbler",
|
|
"item": [
|
|
{
|
|
"name": "JSON",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "60551e90-aea5-4489-aded-a93c6d2ae055",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
},
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "9928c378-cf37-4e20-b653-51f5dde51192",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"method\":\"track.scrobble\",\n\t\"artist\":\"{{example_artist}}\",\n\t\"track\":\"{{example_song}}\",\n\t\"sk\":\"{{session_key}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/audioscrobbler/2.0/",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"audioscrobbler",
|
|
"2.0",
|
|
""
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "JSON Redirect",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "60551e90-aea5-4489-aded-a93c6d2ae055",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"type": "text",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"method\":\"track.scrobble\",\n\t\"artist\":\"{{example_artist}}\",\n\t\"track\":\"{{example_song}}\",\n\t\"sk\":\"{{session_key}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/api/s/audioscrobbler/2.0/",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"s",
|
|
"audioscrobbler",
|
|
"2.0",
|
|
""
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Authorize",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "addc7f42-1de5-4b6d-a840-bb3075bd2cdc",
|
|
"exec": [
|
|
"var data = JSON.parse(responseBody);",
|
|
"postman.setEnvironmentVariable(\"session_key\", data.session.key);",
|
|
"",
|
|
"tests[\"gotkey\"] = true;"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"name": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"method\":\"auth.getMobileSession\",\n\t\"authToken\":\"abc\",\n\t\"username\":\"someguy\",\n\t\"password\":\"{{api_key}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/audioscrobbler/2.0/",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"audioscrobbler",
|
|
"2.0",
|
|
""
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Scrobble Audioscrobbler Legacy",
|
|
"item": [
|
|
{
|
|
"name": "Authorize",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "01f6143f-3134-4006-9792-6e61a2be323d",
|
|
"exec": [
|
|
"var data = responseBody.split(\"\\n\");",
|
|
"postman.setEnvironmentVariable(\"session_key\", data[1]);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
},
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "b97afa75-ab8c-4099-a6cf-6b45d653a10d",
|
|
"exec": [
|
|
"apikey = pm.variables.get(\"api_key\");",
|
|
"ts = 565566;",
|
|
"",
|
|
"token = CryptoJS.MD5(CryptoJS.MD5(apikey) + ts)",
|
|
"",
|
|
"postman.setEnvironmentVariable(\"legacy_token\", token);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"protocolProfileBehavior": {
|
|
"disableBodyPruning": true
|
|
},
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": ""
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/apis/audioscrobbler_legacy/?hs=true&t=565566&a={{legacy_token}}",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"audioscrobbler_legacy",
|
|
""
|
|
],
|
|
"query": [
|
|
{
|
|
"key": "hs",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "t",
|
|
"value": "565566"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"value": "{{legacy_token}}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Scrobble",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/apis/audioscrobbler_legacy/scrobble?t=565566&a={{legacy_token}}&s={{session_key}}",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"apis",
|
|
"audioscrobbler_legacy",
|
|
"scrobble"
|
|
],
|
|
"query": [
|
|
{
|
|
"key": "t",
|
|
"value": "565566"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"value": "{{legacy_token}}"
|
|
},
|
|
{
|
|
"key": "s",
|
|
"value": "{{session_key}}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
],
|
|
"protocolProfileBehavior": {}
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "6659b674-ce6f-48b5-bb64-880356ce6739",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "09c3ea43-30e4-4e83-b32f-dd06c1884bab",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"variable": [
|
|
{
|
|
"id": "3e20a0c6-11fa-4976-8bcb-5c31014e40e7",
|
|
"key": "url",
|
|
"value": "http://localhost:42010"
|
|
},
|
|
{
|
|
"id": "bd31b51f-645d-4ab4-83e1-8eb407978ea8",
|
|
"key": "api_key",
|
|
"value": "localdevtestkey"
|
|
},
|
|
{
|
|
"id": "5ea9cbf8-34f9-4c5e-80b3-42857f014f80",
|
|
"key": "example_artist",
|
|
"value": "EXID ft. Jeremy Soule"
|
|
},
|
|
{
|
|
"id": "fa4d0af7-6f09-4fc6-88ee-39cb6b91b844",
|
|
"key": "example_song",
|
|
"value": "Why is the Rum gone?"
|
|
},
|
|
{
|
|
"id": "e078ab40-4135-4be3-a251-9df21b2601c1",
|
|
"key": "example_artist_2",
|
|
"value": "BLACKPINK ft. Tzuyu"
|
|
},
|
|
{
|
|
"id": "3748cc0f-2bdc-4572-8b17-94a630fa751c",
|
|
"key": "example_song_2",
|
|
"value": "POP/STARS"
|
|
}
|
|
]
|
|
} |