Authoring API Released for Comment
It’s a big day today on developer.podshow.com. We’ve posted a draft of the Authoring API. Its purpose is to allow third-party tools to upload content into the network. It’s based on the metaWeblog API, a standard from the blogging world that a number of pre-existing tools already implement. The API has been live in production for a few months, with members of the PodShow network posting their content through CastBlaster. We’ve also tested the API against one blog tool, Ecto, with success. I suspect and hope that the API will work out of the box with other tools we haven’t checked yet (please do let me know!).
Now we’d like to invite tool developers in to review the documentation and provide feedback, help us find and fix passages that are unclear, let us know about other tools that work with the API, and provide general feedback. Are we missing any key calls? Did we goof up the arguments somewhere? Etc etc.
I’d also like to say a big thanks to Dave Winer, the author of the metaWeblog API, for reviewing a draft of the documentation and uncovering a couple of bugs, now fixed, in our implementation.
Please use the comment thread on this post for feedback. Thanks!!!
[...] It’s a big day today on developer.podshow.com. [...]
[...] Andrew Grumet at PodShow announces that they’ve implemented the Metaweblog API to connect authoring tools with their podcast hosting system. I reviewed their implementation prior to its release, and it appears to work with the OPML Editor, without modification. Looks like a good implementation, and of course I appreciate the support for the API. [...]
I also appreciate the chance to review this work before it was publicly released, because it gives us a chance to work out any problems, unintentional glitches, before they become long-term support problems.
Great news! Will this also be implemented to the Artist (blog)section?
[...] Authoring API released for comment: It’s a big day today on developer.podshow.com. We’ve posted a draft of the Authoring API. Its purpose is to allow third-party tools to upload content into the network. It’s based on the metaWeblog API, a standard from the blogging world that a number of pre-existing tools already implement. The API has been live in production for a few months, with members of the PodShow network posting their content through CastBlaster. We’ve also tested the API against one blog tool, Ecto, with success. [...]
Hi,
I’ve played around a little bit with this and I think I’ll definitely support this API in Übercaster as soon as possible.
Anyway, I’ve managed to receive valid data with “blogger.getUsersBlogs” and “metaWeblog.getRecentPosts”. But any attempt to upload a mp4 file with “metaWeblog.newMediaObject” failed with the following message:
“/FaultCode” = 800;
“/FaultString” = “We’re sorry but we were unable to process this request.”;
Any hints? I’ve tried all kinds of mime types in the type field (audio/mpeg, audio/mpeg3, audio/x-mpeg-3 etc.) and the “bits” are base64-encoded.
Sorry, there is a typo in my post: I’ve tried to upload an mp3 file, not an mp4 file…
Eberhard, that’s great news! Great to hear that the first two calls worked out. Regarding newMediaObject, audio/mpeg should work fine. Let’s take a closer look at the XML that is flowing up to the server. I’ve set up a debug script, will send you the details by email.
It looks pubDate is required in metaWeblog.newMediaObject for Podshow. I only got it to work when I supplied it. In the specs it is in “Optional struct fields for single-call publishing”
Possibly an implementation bug. However, I’m looking at my test scripts now and have several working examples that don’t send pubDate. I will contact you by email to get more details.
FYI - I implemented this API for our German podcast hosting service. The entry point is:
http://www.podhost.de/api/
First tests from ecto and BlogDesk work great, Castblaster unfortunately does currently not allow changing the API URL.
I’m trying to develop a tool that also works with this API, however I can’t seem to find any working informaiton on what the actual link should look like.
I can get XMLRPC to work fine through php with other API’s but cant seem to find a good example of how to use it with podshows API.
The URL: http://www.podshow.com/xmlrpc/pdn is given on your authoring draft but is there a special variable your using? Typically it would be something like
http://www.podshow.com/xmlrpc/pdn?methodCall=xml here] is that not right for yours ?
I looked at the xml example on the blogger.com website you gave for getting the blogger.getUserBlogs method to work and took the xml example and put it in a basic html form textarea using the post method but continue to get faultCode 104 faultString XML error: Empty document at line 1, column 1 as a responce from your server.
Any ideas?
Chuck, perhaps you could describe your use case and what language you’d like to use.
Also, if you haven’t yet, take a read through http://www.xmlrpc.com/.
Yes I’ve looked all over for docs related to xmlrpc, including xmlrpc.com.
I’m not sure what you mean by use case, but from what I understand I should be able to use it with any language.
My test example was nothing more than some basic html code. If I understand what you have done here I should be able to simply create a html form with a textarea element, add the xml example and click the submit button on the html page to get a valid responce from your API.
If you could show an example of what the full link to the API looks like any developer should be able to use your API with any language right?
Here look at this http://phpxmlrpc.sourceforge.net/server.php?methodName=examples.getStateName link, you see here all they have done is allow you to send the XML-RPC request to their API using only a simple HTML form with a textarea to enter the xml arguments.
Any developers stumbling block would be how to create a proper full url to your API. Once a developer has this, they should be able to recreate that link with any programming language.
For the php example their full url would be something like:
http://phpxmlrpc.sourceforge.net/server.php?methodCall=xml structure here] Where the xml structure is the web encoded textarea section of the form used to send the post to their API.
Do you know what the full url to talk with the podshow API is?
is it: http://www.podshow.com/xmlrpc/pdn?methodCall=xml here] for example ?
Here is an example site found on the PDN draft page
http://www.blogger.com/developers/api/1_docs/xmlrpc_getUsersBlogs.html
When I use the phrase [XML HERE] above I am referring to the xml example shown on this page.
blogger.getUsersBlogs
C6CE3FFB3174106584CBB250C0B0519BF4E294
ewilliams
secret
If its not a link problem, then I must be doing something else wrong. Perhaps I need to run the basic xml thru some sort of xml-rpc parcer before sending it to your api?
Can you provide a simple HTML example of how to get a responce from your API ?
The full URL to the API is the one listed in the docs (http://www.podshow.com/xmlrpc/pdn). Per the XMLRPC spec it accepts its arguments, including the method name, in an HTTP POST body.
That HTML form on phpxmlrpc (thanks for sending the link) is a wrapper, not straight XMLRPC. Perhaps we ought to do something like that as well — the illustrative value is clear — but the risk is that implementations against the HTML wrapper will start popping up, and this would be problematic.
Might be simpler to provide code examples in various commonly used languages, which is why asked what you were using. And yes, any language that supports HTTP and XML should work.
Here’s a simple python example:
#!/usr/bin/python from xmlrpclib import Server s = Server('http://www.podshow.com/xmlrpc/pdn') username = 'you@yourdomain.com' password = 'yourpodshowpassword' results = s.blogger.getUsersBlogs('',username,password) print repr(results)Thanks for the code snippit. It worked great on Mac OSX 10.4 Tiger, and on my SuSe linux box.
For anyone not sure what python is you can go http://www.python.org/ and get a download for your operating system to try his above code. To get a better understanding of what XMLRPC is actually doing you can hunt down and view the xmlrpclib.py class file after installing python.
The confusing part was trying to use the example XML request given at http://www.blogger.com/developers/api/1_docs/xmlrpc_getUsersBlogs.html here. Instead your actually not sending the XML in that format you’ll be calling your xmlrpc class file to build the post for you and make the server connection.
ie: results = s.blogger.getUsersBlogs(”,User,Pass)
Hope that helps for anyone else that might have been confused on how to use it.
Do you have a Visual Basic Example?
Hi,
I’m playing with XML-RPC to upload shows for “Free Trinity”. I’m having this problem with my upload.
The show is one wave file with just 5 notes.
I don’t understand what I should do (since I tried all kinds of combination) with the following error message (ps: ’sory’ is misspelled in the error message):
xmlrpclib.Fault:
Which URL is requested here? Is that “http://oscarkoeroo.podshow.com/”, or “http://www.podshow.com/shows/?show_id=7013″, or something else which I didn’t understood. Like a url to the wave file.
cheers,
Oscar
Dump:
PyObject
description
http://www.nikhef.nl/~okoeroo/5notes.wav Big test with Python, the snakes language
title
My first geeky post
url
http://www.nikhef.nl/~okoeroo/5notes.wav
length
34510
link
http://www.nikhef.nl/~okoeroo/5notes.wav
type
audio/x-wav
[{'url': 'http://www.podshow.com/shows/?show_id=7013', 'blogid': '7013', 'blogName': "Oscar's Tech "}]
Traceback (most recent call last):
File “newPost.py”, line 43, in ?
print server.metaWeblog.newPost (7013, “okoeroo@hotmail.com”, “fdmtfw”, e, xmlrpclib.True)
File “/usr/lib/python2.4/xmlrpclib.py”, line 1096, in __call__
return self.__send(self.__name, args)
File “/usr/lib/python2.4/xmlrpclib.py”, line 1383, in __request
verbose=self.__verbose
File “/usr/lib/python2.4/xmlrpclib.py”, line 1147, in request
return self._parse_response(h.getfile(), sock)
File “/usr/lib/python2.4/xmlrpclib.py”, line 1286, in _parse_response
return u.close()
File “/usr/lib/python2.4/xmlrpclib.py”, line 744, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault:
wow, all the xmlrpclib errors got snipped from the site, I’ll send an email
Yes, please send me an email, from the comments I don’t understand what you’re trying to do.
Could you give a visite to the link above or if that doesn’t work directly:
http://groups.google.com/group/freeTrinity and then select the ” Beginning an implementation”.
The prior-to-last submission is mine with a tiny python script that fails and I don’t understand the message: Fault 800: “We’re sorry but we were unable to process this request.”
thanks a million
Hey, i was working with the api and was trying to use metaWeblog.getRecentPosts, but when i used the blogid i got from blogger.getusersblogs it told me it was expecting a string not an int, i discovered that if i used the blog name it seemed to work but i got the error “Fault returned from XML RPC Server, fault code 800: We’re sorry but you don’t appear to be the owner of this show. Please check your settings and try again.”, Im pretty sure im the owned of this show since i created it this morning… Anyone got any ideas on how to make this work?
You should definitely use the the blogid not the blog name. Try coercing the blogid to a string type before making the API call.
Ahh, Yeah it seems in perl that if you just put “123″ as an arg even though it ‘is’ a string you have to add the bits using a built in function for the XMLRPC module! Thanks
I am also having problem with newMediaObject method. I could successfully receive list of blogs, but posting new media object always gives me:
xmlrpclib.Fault:
I am passing name, type and bits fields in the structure.
Perhaps my account needs to be somehow “enabled” to use this API?
Vadim
P.S. I can send TCPDUMP of the session.
What language are you using, and yeah a tcpdump would help out very much, its how i solved my problem
Vadim, have you set up a podcast show on the system yet? That’s the enabling step. Tcpdump or code will do.