Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
yuvalri1
Posts: 1
Joined: Wed Sep 23, 2009 9:04 am

Questions about the API

Sat Sep 26, 2009 2:00 pm

Hi all,

I'm coding a new app for sub searching, mainly in order to learn C# and web-services (and if the outcome will be worth a damn, I will make it public of course).

Anyway, I have been coding a new wrapper for XML-RPC (yea I know there's Cook's XMLRPC.NET but my main goal is learning), and although I have only tried sending a "ServerInfo" request till now, I have noticed that the API method declaration states a return value of
ARRAY,
but the actual response contains a STRUCT object.

Why is that so?
And is this the case with all other API methods with return type ARRAY?

Another thing - with the idea to catch <fault>...</fault>
responses and creating a class for such faults, I tried to send a bad method name, and tried to access the server from the browser, both cases are faulty of course, and although the returned struct had a Fault structure to it (containing something similar to a faultCode member and a faultString member), the enclosing tags are:

<params><param> struct </param></params>

and not as stated in the XML-RPC protocol:
<fault> struct </fault>

So, why isn't the reply created as fault?

Thanks!

User avatar
oss
Site Admin
Posts: 5890
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Sun Sep 27, 2009 1:18 pm

array = struct in docs context.
if there is some mistake in docs, you can edit that, so you will help also other people, no worry about that, I think it is just docs what is wrong.

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Thu Oct 22, 2009 1:20 pm

In XMLRPC I believe all arrays are defined as "structs". Hence the term becoming interchangeable.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

dulf
Posts: 4
Joined: Sat Oct 17, 2009 3:40 pm

Thu Oct 22, 2009 8:46 pm

check my post in this section about "partial subtitles returned", it has some example code in C# using XmlRpc

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 25 guests