My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 24, 2009 by dburkes
Conversation  

Conversation


conversation.get_info

Retrieve information on specified conversation(s). If your session is authenticated, it also returns an unread counter for each conversation.

URL:

Parameters:

api_key or session * Either of API Key or session ID.
cid * A conversation ID, or a comma-separated list of conversation IDs.
include_replies If given with a value greater than zero, then up to that many replies in the specified conversation(s) should be included in the response. If given with a value of zero, all replies are included in the response. If not given, no replies are included in the response.

(*) Required

http://api.rejaw.com/v1/conversation/get_info?session=98765abcDEF&cid=DEFabc98765&include_replies=10
<response>
  <status>ok</status>
  <converstaions>
    <conversation>
      <type>shout</type>
      <timestamp>2008-04-03T18:05:00Z</timestamp>
      <username>foo</username>
      <state>open</state>
      <fullname>The Foo Dude</fullname>
      <cid>DEFabc98765</cid>
      <serial_number>123</serial_number>
      <image_url>http://s3.amazonaws.com/rejaw/user_images/14/image.jpg</image_url>
      <text>Hello!</text>
      <unread>0</unread>
      <replies>14</replies>
      <messages>
        <message>
          <type>shout:reply</type>
          <timestamp>2008-04-03T18:15:00Z</timestamp>
          <username>bar</username>
          <fullname>The Bar Dude</fullname>
          <cid>DEFabc98765</cid>
          <serial_number>128</serial_number>
          <image_url>http://s3.amazonaws.com/rejaw/user_images/32/image.jpg</image_url>
          <text>This is reply 1.</text>
        </message>
        <message>
          <type>shout:reply</type>
          <timestamp>2008-04-03T18:15:30Z</timestamp>
          <username>bar</username>
          <fullname>The Bar Dude</fullname>
          <cid>DEFabc98765</cid>
          <serial_number>164</serial_number>
          <image_url>http://s3.amazonaws.com/rejaw/user_images/32/image.jpg</image_url>
          <text>This is reply 2.</text>
        </message>
      </messages>
    </conversation>
  </conversations>
</response>

conversation.get_replies

Retrieve a list of replies for the specified conversation. If your session is authenticated, it also returns an unread counter for each conversation.

URL:

Parameters:

api_key or session * Either of API Key or session ID.
cid * A conversation ID
limit If given with a value greater than zero, then up to that many replies in the specified conversation(s) should be included in the response. If given with a value of zero, or not given at all, all replies are included in the response.

(*) Required

http://api.rejaw.com/v1/conversation/get_replies?session=98765abcDEF&cid=DEFabc98765&limit=10
<response>
  <status>ok</status>
  <messages>
    <message>
      <type>shout:reply</type>
      <timestamp>2008-04-03T18:15:00Z</timestamp>
      <username>bar</username>
      <fullname>The Bar Dude</fullname>
      <cid>DEFabc98765</cid>
      <serial_number>128</serial_number>
      <image_url>http://s3.amazonaws.com/rejaw/user_images/32/image.jpg</image_url>
      <text>This is reply 1.</text>
    </message>
    <message>
      <type>shout:reply</type>
      <timestamp>2008-04-03T18:15:30Z</timestamp>
      <username>bar</username>
      <fullname>The Bar Dude</fullname>
      <cid>DEFabc98765</cid>
      <serial_number>164</serial_number>
      <image_url>http://s3.amazonaws.com/rejaw/user_images/32/image.jpg</image_url>
      <text>This is reply 2.</text>
    </message>
  </messages>
</response>

conversation.shout

Initiate a shout.

URL:

Parameters:

session * An authenticated session ID is required.
text * Shout message.
room Name of the room this shout should appear in. If present, the shout is sent to all members of the referenced room. If not present, the shout is sent to all followers of the user authenticated in the referenced session.

(*) Required

http://api.rejaw.com/v1/conversation/shout?session=98765abcDEF&text=hello
<response>
  <status>ok</status>
  <cid>Ji8IIB5bIPv</cid>
</response>

conversation.whisper

Initiate a whisper.

URL:

Parameters:

session * An authenticated session ID is required.
text * Whisper message.
users * Usernames separated by comma. (e.g. users=foo,bar)

(*) Required

http://api.rejaw.com/v1/conversation/whisper?session=98765abcDEF&users=foo,bar&text=hello
<response>
  <status>ok</status>
  <cid>zpbi8p7Q7hz</cid>
</response>

conversation.reply

Reply in a conversation. If you reply as a guest, you must first set your guestname using session.set_guestname.

URL:

  • http://api.rejaw.com/v1/conversation/reply

Parameters:

session * Session ID. Session must be either authenticated or given a guestname.
text * Reply message.
cid * A conversation ID to reply.
local_id An optional local id, identifying this reply to the client. This id, if given, will appear in the return value, as well as in the message notification received from a call to event.observe

(*) Required

http://api.rejaw.com/v1/conversation/reply?session=98765abcDEF&text=hello&cid=Ji8IIB5bIPv&local_id=4
<response>
  <status>ok</status>
  <serial_number>447</serial_number>
  <local_id>4</local_id>
  <timestamp>2008-04-03T22:13:54Z</timestamp>
</response>

conversation.delete

Delete a conversation including replies.

URL:

Parameters:

session * An authenticated session ID is required.
cid * A conversation ID to delete.

(*) Required

http://api.rejaw.com/v1/conversation/delete?session=98765abcDEFcid=Ji8IIB5bIPv
<response>
  <status>ok</status>
</response>
{"status": "ok"}

conversation.delete_reply

Delete a reply in a shout or a whisper. If you're the owner of the shout or whisper, you can delete any replies in it. If you're not the owner, you can delete only replies that you made.

URL:

Parameters:

session * Either of API Key or session ID.
cid * The conversation ID that includes the message.
mid * The serial number of the message to delete.

(*) Required

http://api.rejaw.com/v1/conversation/delete_reply?session=98765abcDEF&cid=Ji8IIB5bIPv&mid=453
<response>
  <status>ok</status>
</response>
{"status": "ok"}

conversation.catch_up

Mark a specified conversation as read.

URL:

Parameters:

session * An authenticated session ID is required.
cid * A conversation ID.

(*) Required

<response>
  <status>ok</status>
</response>
{"status": "ok"}

conversation.mute

Stop receiving realtime notifications for the specified conversation(s).

URL:

Parameters:

session * An authenticated session ID is required.
cid * A conversation ID, or a comma-separated list of conversation IDs.

(*) Required

http://api.rejaw.com/v1/conversation/mute?session=98765abcDEF&cid=DEFabc98765
<response>
  <status>ok</status>
</response>

conversation.unmute

Start receiving realtime notifications for the specified conversation(s) again.

URL:

Parameters:

session * An authenticated session ID is required.
cid * A conversation ID, or a comma-separated list of conversation IDs.

(*) Required

http://api.rejaw.com/v1/conversation/unmute?session=98765abcDEF&cid=DEFabc98765
<response>
  <status>ok</status>
</response>

conversation.favorite

Mark the specified conversation(s) as favorites.

URL:

Parameters:

session * An authenticated session ID is required.
cid * A conversation ID, or a comma-separated list of conversation IDs.

(*) Required

http://api.rejaw.com/v1/conversation/favorite?session=98765abcDEF&cid=DEFabc98765
<response>
  <status>ok</status>
</response>

conversation.unfavorite

Remove the specified conversation(s) from the favorites list.

URL:

Parameters:

session * An authenticated session ID is required.
cid * A conversation ID, or a comma-separated list of conversation IDs.

(*) Required

http://api.rejaw.com/v1/conversation/unfavorite?session=98765abcDEF&cid=DEFabc98765
<response>
  <status>ok</status>
</response>

conversation.search

Search shouts, replies, and, possibly, whispers, by keywords. If an authenticated session id is provided, results may contain whispers (and replies in whispers) that the authenticated user is a member of. Otherwise, results will only contain public shouts and replies in those shouts.

URL:

Parameters:

api_key or session * Either of API Key or session ID.
q * Keyword(s) to search by

(*) Required

http://api.rejaw.com/v1/conversation/search?session=98765abcDEF&q=frog
<response>
  <status>ok</status>
  <messages>
    <message>
      <type>shout</type>
      <timestamp>2008-04-03T18:05:00Z</timestamp>
      <username>foo</username>
      <fullname>The Foo Dude</fullname>
      <cid>DEFabc98765</cid>
      <serial_number>123</serial_number>
      <image_url>http://s3.amazonaws.com/rejaw/user_images/14/image.jpg</image_url>
      <text>I love frogs!</text>
    </message>
    <message>
      <type>shout:reply</type>
      <timestamp>2008-04-03T18:15:00Z</timestamp>
      <username>bar</username>
      <fullname>The Bar Dude</fullname>
      <cid>8dk3FG94A09</cid>
      <serial_number>167</serial_number>
      <image_url>http://s3.amazonaws.com/rejaw/user_images/32/image.jpg</image_url>
      <text>I hate frogs!</text>
    </message>
  </messages>
</response>
Hosted by Google Code