Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Shoutcast Technical Support (http://forums.winamp.com/forumdisplay.php?f=86)
-   -   API getendpoints return... (http://forums.winamp.com/showthread.php?t=326899)

helios399 4th February 2011 11:46

API getendpoints return...
 
Hi guys,

I'm starting with shoutcast API's and I would want to get informations about encoders. (and modify them after)

I run two instances of sc_trans (V2) with 2 differents endpoints /s1 & /s2 on the same sc_serv (V2) (sc_trans1.conf & sc_trans2.conf)
No problem to connect with API.

But when I want to retreive informations about encoders with 'getendpoints', I receive only information about the first encoder ” /s1”
I tried to specify a "name" like name="/s1" or name="/s2" I receive informations for /s1 but nothing for /s2
Result for /s2 = <response>...<endpoints></endpoint> …</response>

As it is written in sc_trans_ajax_api.txt, the parameter "name" isn't required, but I want to retreive information about one specific encoder

I don’t understand why ? Do I need specify something special in sc_trans.conf or sc_serv for the second encoder ? Something missing ?

Thanks for your help…

Here is my simpleAjax code :

Quote:

$.ajax({
type: "POST",
username: 'admin',
password: 'xxx',
url: 'http://localhost:8100/api',
data: {op:"getendpoints",seq:10},
success: function(xml2) { parseXml(xml2); },
error: function(XMLHttpRequest, textStatus, errorThrown) { },
async:false
});


helios399 4th February 2011 15:55

resolved
 
I have to put one different adminport for each encoder

adminport=8100 for endpointname=/s1
adminport=8101 for endpointname=/s2

thanks !

DrO 4th February 2011 17:05

well that's good to know the api is working now you've realised you need to query each instance of sc_trans separately :). if you were only using one instance to provide both instances then you would have gotten the multiple response that you were expecting from the first post.

-daz

helios399 4th February 2011 20:50

very helpful precision...
Thanks


All times are GMT. The time now is 14:14.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.