Sonos Music API service reporting and manifest file

那年仲夏 提交于 2019-12-25 00:50:05

问题


We've built a SMAPI implementation that is serving up audiobooks. We're able to browse books and play them, but we're running into problems getting reporting to work correctly. We saw that the reporting endpoints for SMAPI have been deprecated, so we're attempting to follow the directions from the "Add reporting" page.

We added a reporting path at https://<our_service>/v1/reporting and added endpoints for requests to /context and /timePlayed off of that base path. We're able to hit them directly ourselves, so they're running.

We also created and hosted a manifest file at https://<our_service>/v1/files/manifest.json, which we're also able to hit directly and get the JSON file.

{
  "schemaVersion": "1.0",
  "endpoints": [
    {
      "type": "reporting",
      "uri": "https://<our_service>/v1/reporting"
    }
  ],
  "strings": {
    "uri": "https://<our_service>/v1/files/strings.xml",
    "version": 1
  }
}

After that we added our service for testing using the customsd page. We're still able to navigate the menus and play audiobooks, but Sonos appears to be sending the deprecated reporting requests to our SOAP service instead of the new reporting endpoints.

We found this question where someone appeared to be using a SMAPI implementation along with the new endpoints, but we haven't been able to figure out what we're doing differently that's causing the problem. Any ideas or suggestions would be much appreciated.


回答1:


It looks like you have unsupported version numbers for the reporting endpoint and the Manifest Uri. v1 is not supported. Acceptable version numbers are v1.0, v2.0 or later. For reference, see:

  • The example under Add a manifest file with an endpoint in Add reporting.
  • POST /timePlayed for a list of features for each version.
  • Cloud queue base URL and API version in Play audio (cloud queue) for details about the URL and API version format.

Updated with more details:

  • The endpoint doesn’t have to have report at the end, it can be called anything.
  • The order doesn’t matter. Both /v2.1/reporting and /stuff/report/v2.3 are valid.
  • The reporting endpoint doesn’t have to be HTTPS, it can be insecure HTTP.
  • The manifest URL cannot be insecure, it must use HTTPS.


来源:https://stackoverflow.com/questions/57596739/sonos-music-api-service-reporting-and-manifest-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!