svrooij/sonos-api-docs

Generate insomnia file

Opened this issue · 0 comments

Insomnia is a really nice tool to test http calls. How cool would it be if there was a generated file that supports all the sonos calls.

{
  "_type": "export",
  "__export_format": 4,
  "__export_date": "2021-01-12T23:23:00.857Z",
  "__export_source": "insomnia.desktop.app:v2020.5.2",
  "resources": [{
    "_id": "req_e7a219407cf24786b74ecc314c5fc102",
    "parentId": "fld_27e2408455d542fda75753d78d3afa0c",
    "modified": 1610493481306,
    "created": 1610492647833,
    "url": "http://{{ _.host }}:{{ _.port }}/AlarmClock/Control",
    "name": "ListAlarms",
    "description": "",
    "method": "POST",
    "body": {
      "mimeType": "application/xml",
      "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:Envelope\n\txmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n\t<s:Body>\n\t\t<u:ListAlarms\n\t\t\txmlns:u=\"urn:schemas-upnp-org:service:AlarmClock:1\">\n\t\t</u:ListAlarms>\n\t</s:Body>\n</s:Envelope>"
    },
    "parameters": [],
    "headers": [{
      "name": "soapaction",
      "value": "\"urn:schemas-upnp-org:service:AlarmClock:1#ListAlarms\"",
      "description": "",
      "id": "pair_60631ab9449d46988c9842657261e024"
    }, {
      "name": "Content-Type",
      "value": "text/xml; charset=\"utf-8\"",
      "id": "pair_6827448929584270ba4a32570d33169c"
    }],
    "authentication": {},
    "metaSortKey": -1610492647833,
    "isPrivate": false,
    "settingStoreCookies": true,
    "settingSendCookies": true,
    "settingDisableRenderRequestBody": false,
    "settingEncodeUrl": true,
    "settingRebuildPath": true,
    "settingFollowRedirects": "global",
    "_type": "request"
  }, {
    "_id": "fld_27e2408455d542fda75753d78d3afa0c",
    "parentId": "wrk_66c9e68fadd74802b8df737b6b353052",
    "modified": 1610492628004,
    "created": 1610492628004,
    "name": "AlarmClockService",
    "description": "",
    "environment": {},
    "environmentPropertyOrder": null,
    "metaSortKey": -1610492628004,
    "_type": "request_group"
  }, {
    "_id": "wrk_66c9e68fadd74802b8df737b6b353052",
    "parentId": null,
    "modified": 1610492519291,
    "created": 1610492519291,
    "name": "Sonos",
    "description": "",
    "scope": null,
    "_type": "workspace"
  }, {
    "_id": "req_adf99e4a7994451dadb7495852a4c4ae",
    "parentId": "fld_06782a916bb94693839bfc88cab7c01f",
    "modified": 1610493747034,
    "created": 1610493210414,
    "url": "http://{{ _.host }}:{{ _.port }}/MediaRenderer/AVTransport/Control",
    "name": "Play",
    "description": "Start playback",
    "method": "POST",
    "body": {
      "mimeType": "application/xml",
      "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:Envelope\n\txmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n\t<s:Body>\n\t\t<u:Play\n\t\t\txmlns:u=\"urn:schemas-upnp-org:service:AVTransport:1\">\n\t\t\t<InstanceID>0</InstanceID>\n\t\t\t<Speed>1</Speed>\n\t\t</u:Play>\n\t</s:Body>\n</s:Envelope>"
    },
    "parameters": [],
    "headers": [{
      "name": "soapaction",
      "value": "\"urn:schemas-upnp-org:service:AVTransport:1#Play\"",
      "description": "",
      "id": "pair_60631ab9449d46988c9842657261e024"
    }, {
      "name": "Content-Type",
      "value": "text/xml; charset=\"utf-8\"",
      "id": "pair_6827448929584270ba4a32570d33169c"
    }],
    "authentication": {},
    "metaSortKey": -1610492647833,
    "isPrivate": false,
    "settingStoreCookies": false,
    "settingSendCookies": false,
    "settingDisableRenderRequestBody": false,
    "settingEncodeUrl": false,
    "settingRebuildPath": false,
    "settingFollowRedirects": "off",
    "_type": "request"
  }, {
    "_id": "fld_06782a916bb94693839bfc88cab7c01f",
    "parentId": "wrk_66c9e68fadd74802b8df737b6b353052",
    "modified": 1610493210412,
    "created": 1610493210412,
    "name": "AVTransport",
    "description": "",
    "environment": {},
    "environmentPropertyOrder": null,
    "metaSortKey": -1610488229724,
    "_type": "request_group"
  }, {
    "_id": "env_09b1f7945fda3ec533c4d8586c26f9b9e22bf647",
    "parentId": "wrk_66c9e68fadd74802b8df737b6b353052",
    "modified": 1610492560174,
    "created": 1610492519359,
    "name": "Base Environment",
    "data": {
      "host": "192.168.96.56",
      "port": 1400
    },
    "dataPropertyOrder": {
      "&": ["host", "port"]
    },
    "color": null,
    "isPrivate": false,
    "metaSortKey": 1610492519359,
    "_type": "environment"
  }, {
    "_id": "jar_09b1f7945fda3ec533c4d8586c26f9b9e22bf647",
    "parentId": "wrk_66c9e68fadd74802b8df737b6b353052",
    "modified": 1610492519361,
    "created": 1610492519361,
    "name": "Default Jar",
    "cookies": [],
    "_type": "cookie_jar"
  }, {
    "_id": "spc_f9a8d654359a4ff189db18bb022b5862",
    "parentId": "wrk_66c9e68fadd74802b8df737b6b353052",
    "modified": 1610492519302,
    "created": 1610492519302,
    "fileName": "Sonos",
    "contents": "",
    "contentType": "yaml",
    "_type": "api_spec"
  }]
}