Skip to Content
It is currently November 21st, 2019, 3:48 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Include the TuneIn API
PostPosted: April 1st, 2015, 3:51 pm 
Offline
New User
New User

Joined: December 26th, 2014, 3:34 am
Posts: 5
Ok,

So I've been doing some research and coming up empty handed. What I am trying to accomplish is polling the TuneIn AIR API via SAM Cast just like we send the data to our SC Servers.

Here is my current script to send the data:

Code:
Function HandleLine(sLine)

divisao = (sline)
divisao = split(divisao,"-")
   'Recommended minimum fields to fill in
        SongInfo.Value("artist") = (Trim(divisao(0)))
        SongInfo.Value("title") = (Trim(divisao(1)))
   SongInfo.Value("songtype") = "S" 'See songtypes.txt

   'Triggers the metadata update in SAM Cast
   SongInfo.DoSongChange
End Function


What I'd like to know, is how would one also place code to submit a URL for TuneIn so it ingests the same now playing data and will display on their site without having to go through a ton of hullabaloo.

Any suggestions welcomed.


Top
 Profile  
Reply with quote  
PostPosted: April 1st, 2015, 6:22 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7882
Location: Aachen (Germany)
Aren't these scripts just standard VBscript with a bit special sauce for the SAM Cast API?
You should be able to use all the standard VBscipt commands including CreateObject.

This is sample code copied from stackoverflow about how to create a HTTP GET request with VBScript.
Code:
Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://www.example.com", False
o.send


Is this enough to get you started?
This is the MSDN site about VBScript including a language reference and a user guide:
https://msdn.microsoft.com/de-de/library/t0aew7h6.aspx

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 1st, 2015, 11:44 pm 
Offline
New User
New User

Joined: December 26th, 2014, 3:34 am
Posts: 5
That looks like that'd be a good way to get started, I guess my next question would be that since I use FilePoller how would I tell it to read the same artist title data?

Something along the lines of the same Variables in the top script


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group