My favorites | Sign in
Project Logo
                
Search
for
Updated Feb 05, 2009 by dburkes
API  
Rejaw API documentation

Introduction

Rejaw offers a full set of API so that developers can build tools that interoperate with Rejaw's functionality. This document is a reference for the API.


Basics

HTTP methods

The Rejaw API allows both GET or POST. We recommend that you comply with the design principles of Representational State Transfer (REST) as long as possible, but if you can't for some reason, it's also fine that you simply use GET for everything.

Formats

Rejaw supports JSON, XML as data formats. Unless otherwise stated, all API methods support XML and JSON as a response format, in the form of extension such as .json and .xml respectively. When the extension is omitted, XML is used by default.

  • http://api.rejaw.com/v1/user/get_info
  • http://api.rejaw.com/v1/user/get_info.xml
  • http://api.rejaw.com/v1/user/get_info.json

When JSON is specified, all methods accept a callback parameter, which will pass the JSON object to a given function so that you can simply eval the response. For instance, when callback=myFunc is given, the response body will look like this:

myFunc({"status": "ok", "session": "2lA42FcLddH"})

Character Encoding

Rejaw uses and expects UTF-8 encoding everywhere. That's the long and short of it.

Timestamps

All timestamps are given in the format of ISO 8601 standard with UTC timezone.

2008-04-16T22:53:20Z

API Keys

To use the Rejaw API, you need to have an API key. To generate a key, you need to register your application.

Session and Authentication

There are two types of API methods: The ones that require authentication, and the ones that don't.

With an API that requires authentication, you'll find yourself doing the following steps all the time:

  1. call session.create
  2. call auth.signin
  3. call the API in question
  4. call session.destroy

Rate Limiting

The API currently has no limit on the number of requests applications can make, but we reserve the right to apply rate limiting at our discretion. Please be kind to the API and try to use the minimum number of requests to accomplish a task. If you need help figuring out how to efficiently perform a task, feel free to ask in the Discussion.

Flash/ActionScript Developers

The crossdomain.xml is located at http://api.rejaw.com/crossdomain.xml.

Error Codes

When an API call fails, it returns an error code describing what went wrong. A complete list of error codes is available here.


Tutorial

If your system has curl, you’ve already got a great way to poke around the Rejaw API. Here are some examples:

Replace {YOUR_API_KEY}, {YOUR_USERNAME} and {A_CONVERSATION_ID} to real ones.

If you want more, here's the tutorial to learn the overview of how the Rejaw API works.


API Methods

Session

  • session.create
  • session.destroy
  • session.verify
  • session.set_guestname

Authentication

  • auth.signin
  • auth.signout

User

  • user.get_info
  • user.get_profile
  • user.set_profile
  • user.get_inbox
  • user.get_people
  • uesr.add_to_inbox
  • user.start_following
  • user.stop_following
  • user.catch_up
  • user.search

Conversation

  • conversation.get_info
  • conversation.get_replies
  • conversation.shout
  • conversation.whisper
  • conversation.reply
  • conversation.delete
  • conversation.delete_reply
  • conversation.catch_up
  • conversation.search

Room

  • room.get_info
  • room.get_members
  • room.add_user
  • room.remove_user
  • room.grant_owner
  • room.revoke_owner

Subscription

  • subscription.subscribe
  • subscription.unsubscribe

Event

  • event.observe

Timeline

  • timeline.public
  • timeline.user

Search

  • search.people
  • search.messages

Feeds

Here's the list of available feeds on Rejaw.


Resources


Recent Changes


Got a comment?

If you've got something to say about the API reference, please let us know in the Rejaw Google Groups.

Hosted by Google Code