Some of you have done a great job developing gadgets and widgets and whatnot. I've recently developed a new feature for all the websites in the 24seven.fm network that should make your development a lot easier.
You will no longer need to parse the websites to get the queue, history and what's playing. I've put a webservice on all the sites that give you all the information you need in one go.
Those of you who are not software developers or have no idea what this is all about need not worry. This is technical stuff

The webservice can be found on all the sites using /soap/FM24seven.wsdl

Methods provided:

GetCurrentlyPlaying(boolean GetCover)

This method returns an object with all the information about the currently playing track. It's the same information that can be found in playing.php. If you call the method with the GetCover parameter set to "true" the webservice will return the binary data for the currently playing song. "false" puts NULL in the binary data, but you still have the URL to the cover in the message.

Here you will get an array of an object that contains information about the songs in the queue or history. The information in the object is the same as can be found on the Queue/Played page.
The NoOfEntries parameter lets you control how many entries is returned. The maximum number of entries returned is 20.
The GetCover parameter behaves in the same way as for GetCurrentlyPlaying().

We would appreciate if you would limit your requests to the webservice. Use it only when a song has changed. The GetCurrentlyPlaying() includes the length of the currently playing track (in milliseconds), when the track started playing (dateTime) and what the time was on the server when you invoked the webservice. That should make it easy enough to calculate a countdown timer so that you know when the track has finished playing._________________Ms. Chanandler Bong?

"Anything one man can imagine,
other men can make real."
- Jules Verne

Maybe I will use it sometime in something I do not know what for application yet.

Thank you._________________That's the beauty of music. They can't take that away from you. (Andy Dufresne)
CollectionsRequestsNUT/RAT

Freetrack
Cadet 1

Joined: Sep 02, 2008
Member#: 22509
Posts: 2

Posted:
Thu Dec 18, 2008 2:33 pm Post subject: Some suggestions

First of all: Thanks for the API. I was able to satisfy my basic needs...

Here some suggestions you may consider the next time you build / change the API:

1. CurrentlyPlaying.CoverArt is defined as a byte array, but contains a base64 encoded string
2. All text properties (and links) are html escaped. i.e.: &amp; instead of &, &gt; instead of >
3. The QueueEntry class is missing the Artist property?
4. All DateTime's should be in UTC, someone may use them for i.e. time synch
5. the time CurrentlyPlaying.PlayStart does not match the real timestamp ~ 15 seconds off --> i guess this has some lawful reasons (to prevent someone to rip the stream to a harddisk)

I do not have a http space so I can't upload the little program i wrote.

Chandler, this is great news. I wonder why I never found this thread before! Thanks to freetrack for the revival.

Currently I've been parsing the now playing php header, and every time a little change is made to the layout I have to do some recoding. On avg once every few months or as it happens twice in a week on rare occasions. And yes, the app only refetches "what's playing" after the internal timer runs out e.g. "00:00".

I've PMed the little util I've created to a few users but have been way out of touch recently so no one has the upgraded parsing version! doh! even I didn't run it for a few weeks, which is way out of the norm for me.

If anyone's curious here's the app. I've been using it myself for close to two years now. It alerts you when your requested track is on and you can sort and search faves and tracks you've requested. If interested, please PM. As I'd like to keep track of who's using it , to send updates to.

As of a few days the 'GetCurrentlyPlaying' method returns an empty 'CoverLink' entity.

Is this something that should be fixed after the install of the new server?_________________The Hitchhiker's Guide to the Galaxy on Flying: The knack of throwing yourself at the ground and miss.
24SeVeN.FM Gadgets

JERIC
Fleet Admiral (Proprietor)

Joined: Feb 12, 2002
Member#: 1
Posts: 4939
Location: Richmond, VA

Posted:
Sun Nov 14, 2010 12:41 pm Post subject:

I'm not sure how it is pulling that info. If you can email me at jeric@(this site) with how it pulls this info, I can try to track down what changed. The images are still in the same locations though._________________"Are you not entertained? Are you not entertained? Is this not why you are here?." -Maximus

Please do not PM me. Use email, Feedback or Contact Us links.

Chandler
Admiral (Administrator)

Joined: Jan 25, 2003
Member#: 333
Posts: 709
Location: Norway

Posted:
Thu Dec 02, 2010 7:27 am Post subject:

stefan_nl wrote:

As of a few days the 'GetCurrentlyPlaying' method returns an empty 'CoverLink' entity.

Is this something that should be fixed after the install of the new server?

I've made a change to the SOAP service. Can you try again now to see if it works like it used to?_________________Ms. Chanandler Bong?

"Anything one man can imagine,
other men can make real."
- Jules Verne

I've made a change to the SOAP service. Can you try again now to see if it works like it used to?

The image path is back in the result.
Works like a charm._________________The Hitchhiker's Guide to the Galaxy on Flying: The knack of throwing yourself at the ground and miss.
24SeVeN.FM Gadgets

Luther_III
Commander

Joined: Jun 20, 2005
Member#: 10621
Posts: 746
Location: New Orleans

Posted:
Thu Dec 02, 2010 12:30 pm Post subject:

Works like a charm, indeed. My iGoogle gadget is now fixed!

Great work, gang!

_________________"If I were not a physicist, I would probably be a musician. I often think in music. I live my daydreams in music. I see my life in terms of music.... I get most joy in life out of music."
--Albert Einstein

Can this be fixed again?_________________The Hitchhiker's Guide to the Galaxy on Flying: The knack of throwing yourself at the ground and miss.
24SeVeN.FM Gadgets

megadith
Lieutenant Commander

Joined: May 06, 2002
Member#: 82
Posts: 262
Location: Arlington, VA

Posted:
Thu Oct 27, 2011 5:49 pm Post subject:

Does anyone know if there's a WinPhone app yet? if not, i'm thinking of writing one for this and the rest of 24seven site. Wanted to know if there was an app already and if the web service was still working.