Simple example http client mopidy


#1

Hi all,

I’m trying to develop a physical product that interacts with mopidy, friends of mine advised working with sending http request by using json. I was wondering if anyone has a simple example code which is able to do minor actions with mopidy through http requests, such as play a song or request a playlist.

If I could use this example code I might be able to grasp a bit better how all this works. I have almost no experience with this, but I have quite some experience in other programming languages. So I hope an example program might push me in the right direction. I already looked at the javascript library, but that still didn’t give me a lot of fo clarity.

thanks everyone


#2

Is there a problem using the exmaple curl commands provided by mopidy-api-explorer that I already suggested in Can't connect MPD & Can't use spotify pimusicbox ?

Also see Control mopidy by python code and Trigger Play / Pause from HTTP request


#3

There is no problem with those at all, I’m just at the moment not seeing how I can put it in a program. But I will check your other links to see if I figure it out with those.


#4

Ah OK. You may find the python mpd2 library is the easiest way to get going: https://pythonhosted.org/python-mpd2/topics/getting-started.html