Share on Ovi API

From rukapedia
Revision as of 15:00, 9 July 2008 by Peter (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introspection Document

From Atom Publishing Protocol Specification: "The Introspection Document describes 'workspaces', which are server-defined groupings of collections."

Mine looks like this:

<?xml version="1.0"?>
<service xmlns="http://purl.org/atom/app#" xmlns:atom="http://www.w3.org/2005/Atom">
	<workspace>
		<atom:title>posting</atom:title>
		<collection href="http://share.ovi.com/api/atom/1.0/ruk.mymedia">
			<atom:title>ruk.mymedia</atom:title>
			<accept>entry</accept>
			<link type="text/html" rel="alternate" href="http://share.ovi.com/mobile/channel/ruk.mymedia" title="ruk.mymedia"/>
			<link type="text/html" rel="mobile" href="http://share.ovi.com/mobile/channel/ruk.mymedia" title="ruk.mymedia"/>
		</collection>
		<collection href="http://share.ovi.com/api/atom/1.0/ruk.public">
			<atom:title>ruk.public</atom:title>
			<accept>entry</accept>
			<link type="text/html" rel="alternate" href="http://share.ovi.com/mobile/channel/ruk.public" title="ruk.public"/>
			<link type="text/html" rel="mobile" href="http://share.ovi.com/mobile/channel/ruk.public" title="ruk.public"/>
		</collection>
	</workspace>
	<workspace>
		<atom:title>commenting</atom:title>
		<collection href="http://share.ovi.com/api/atom/1.0/comment/"/>
	</workspace>
	<workspace>
		<atom:title>feeds</atom:title>
		<collection href="http://share.ovi.com/feeds/atom/1.0/nokia/feed.aspx?tab=media&type=my">
			<atom:title>my latest uploads</atom:title>
		</collection>
		<collection href="http://share.ovi.com/feeds/atom/1.0/nokia/feed.aspx?tab=media&type=contacts">
			<atom:title>my contacts' media</atom:title>
		</collection>
		<collection href="http://share.ovi.com/feeds/atom/1.0/nokia/feed.aspx?tab=media&type=mostrecent">
			<atom:title>everyone's media</atom:title>
		</collection>
		<collection href="http://share.ovi.com/feeds/atom/1.0/nokia/feed.aspx?tab=media&type=mycommented">
			<atom:title>my commented media</atom:title>
		</collection>
	</workspace>
</service>

Uploading Media

The endpoints to which media can be POSTed are in the Introspection Document. For me they are:

POSTing a JPEG to the ruk.mymedia URL results in a return of:

HTTP/1.1 201 Created
Date: Wed, 09 Jul 2008 18:56:20 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Location: http://share.ovi.com/api/atom/1.0/ruk.mymedia/ruk.10020
Cache-Control: public
Content-Type: application/atom+xml; charset=utf-8
Content-Length: 562

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2005/Atom">
	<link rel="alternate" type="text/html" href="http://share.ovi.com/media/ruk.mymedia/ruk.10020"/>
	<link rel="edit" type="application/x.atom+xml" href="http://share.ovi.com/api/atom/1.0/ruk.mymedia/ruk.10020"/>
	<link rel="mobile" type="application/x.atom+xml" href="http://share.ovi.com/api/atom/1.0/ruk.mymedia/ruk.10020"/>
	<author>
		<name>ruk</name>
	</author>
	<id>ruk.10020</id>
</entry>