musicbeeremote / mbrc-plugin

MusicBee Remote Plugin
http://mbrc.kelsos.net
Other
114 stars 11 forks source link

Sample API usage #20

Open ceribik opened 9 years ago

ceribik commented 9 years ago

Can you provide an example of how to access the API (e.g. using cURL)?

I tried myself but couldn't get the server to respond since it's not a regular API.

kelsos commented 9 years ago

You are talking about the REST api from the development tree? I will upload a build with swagger included in the evening along with instructions on how to access the documentation.

kelsos commented 9 years ago

OK since I haven't build the development branch for a while I have some issues making it to work. I will check it in the following days as soon as I get some time but here is Swagger.

If you managed to build and run the plugin, just put the swagger zip content in Plugin folder of MusicBee along with the plugin. You should have something like Plugins\apidoc\index.html now if the plugin is active it should have two Ports available under the settings panel.

If the port is for example 5000 for http, the documentation should be available at http://localhost:5000/apidoc. If you have any problem accessing the port outside of the machine running the plugin, I also have a firewall utility included.

Generally this should provide a clear documentation on what the plugin expects and returns for each call.

If you have an issues feel free to ask me anything.