Ever wished that MySpace had an API for adding gigs to your band’s profile? If you view source on the add an event page on MySpace you might notice the url is prefixed with /API. Hmm, is this a sign of an impending release? Hopefully.
In the meantime you’ll need to roll your own.
You could use any of the current crop of libraries for http wizardry, RestClient or HTTParty maybe, but we’ve opted for Mechanize, which gives us the flexibility to interact with page elements as well as do the usual request/response stuff to urls.
There’s nothing fancy about MySpace’s forms, just post a bunch of params to the url and you’re golden. They’re even using JSON in the response.
The toughest part is that there’s no documentation as to what is required for the request to work, it’s pretty straightforward to view source and see what’s getting submitted though, so I’m sure you’ll be alright.
-
howardtharp liked this
-
felixclack posted this