Revver Developer Center: Api

Revver Developer Center



Introduction

The Revver API provides web developers and site owners an easy way to access the Revver system and complete Revver library. All Revver users have the ability to distribute and syndicate Revver videos using an advanced set of features that allows you to create a dynamically driven video portal site and earn additional ad revenue for each ad click.

The Revver syndication model rewards you for any traffic you generate to videos -- this API was designed with you in mind -- helping you capitalize on all the syndication opportunities the Revver community has to offer.

Getting Started

As a Revver user, your account is already set up for full access to the Revver API. Using your server language of choice, you can start making calls directly to the Revver API and making syndication money off your video site.

If you registered after September 15th, you’ll need to create a separate account on our staging environment, which will allow you to test the wide array of features the Revver API offers.

Register a staging account and get started using the Revver API.

Overview

Current Version 1.0
Protocols Supported The Revver API is exposed through JSON using HTTP GET and XMLRPC, implemented on an HTTPS transport layer.
Object Model The object model in the API is based on namespaces which can have access restrictions depending on the level of access a user is allowed.
Authentication Users are authenticated using their revver username/password (or staging username/password) as params on the URL (required for XMLRPC but not used in JSON)
Production URL https://api.revver.com/[xml | json]/1.0?login=<username>&passwd=<password>
Staging URL
*XML Only
https://api.staging.revver.com/xml/1.0?login=<username>&passwd=<password>
( During development, please use the Staging URL for all API calls ).

API Architecture

The API and it's methods are what is behind the website at http://www.revver.com, and it provides code level access to the Revver Platform.

API Conventions

The Revver API has been developed along a common set of standards and conventions. In order to understand how to get the most from the API, you should first understand these standards and conventions.

User Model
(Parent/Child-User)
The current API User is always the login that is in the URL when calling the API. Parent users are any API Users that have created their own users using the user.create() method. Child users are users that have been created using user.create() and are the children of whomever was the API User at the time the call was made. Child users cannot directly authenticate the API. In order to authenticate child-users the API user may use user.authenticate(). While logged into the API, parent users can access any details of their child users. user.authenticate() does not change the API User, and it only used to verify passwords within the system. Even if not used to authenticate the child user, the API User can still access any and all child user related data.
API Object Model At present, there are four objects in the Revver API: Video, User, Collection and Message. Methods within the API act upon those objects.
Query Objects The Revver API utilizes "query objects" in various methods. In XML-RPC this is the same as "struct". In JSON, this is a JSON Object. ALL Queries to the API are done so by passing a type of query object with the various key/value pairs being requested. Queries can be as simple or as complex as the user desires. You do not need to know SQL. .
User Object Access For most methods, there are additional ReturnFields and/or Query options that will become available to an authenticated user. The user can use methods that act upon their objects and/or any objects of their child-users.
Return Fields Return Fields are always an array that represents the avaiable object parameters that are viewable to a user. As indicated above, when authenticated objects belonging to the authenticated user will have additional return fields. Examples of this would be querying all videos owned by a child user, in which case the returnFields of "revenue" and "completes" become available. If not querying using "owner" or if "owner" is not the authenticated user or one of their child-users, then these fields are not available.
Errors Aside of the Global Errors listed below, each method may have it's own error codes. These are returned to the user in a standard way, and thus it is easy to build Exception Handlers as needed. Because there may be new error codes that are added over time, it's a good idea to handle unknown error codes in your code anyway.
Collections Collections are essentially stored Query Objects. The system presently supports collections of Users, Videos and other Collections.

Language Support

The Revver API can be used with virtually any server-side language, from widely available and popular open-source languages and frameworks such as PHP and Ruby on Rails to enterprise-level languages/frameworks such as Java or Microsoft’s .NET.

Below are links to examples of various scripts used to retrieve and assemble the XML/RPC data using a collection of different langauges.

If you have code examples using the Revver API that you think should be on here, or wish to contribute your own, please contact us at developercenter@revver.com

Global Errors

3 Authentication Failed
1000 Invalid argument error. Includes description of why argument was invalid.