Skip to content

direct messages.conversation list

lisztli edited this page Jan 12, 2012 · 4 revisions

#GET /privete_messages/conversation_list

以对话的形式返回当前用户的私信列表

##路径

http://api.fanfou.com/direct_messages/conversation_list.[json|xml]

##调用方法

GET 

##限制条件

用户登录, API需要有读用户私信的权限

##参数:

###count

  • 作用: 指定返回用户的数量, 默认为20

  • 格式: count=user_count

  • 字段说明: 可选, count 取值范围1至60

###page

  • 作用: page用于指定返回结果的页码

  • 格式: page=page_id

  • 字段说明: 可选

###mode

  • 作用: 当mode=default(默认)时,返回消息中用户信息包含用户自定义profile.mode=lite, profile不会包含在返回信息中

  • 格式: mode=[default|lite]

  • 字段说明: 可选

###callback

  • 格式: callback=javascript函数名

  • 作用: 当使用json格式时,生成的json对象将作为参数传给指定的javascript函数

  • 字段说明: 可选

##返回结果

###成功

  • HTTP Status Code

    200 OK HTTP/1.1

  • 返回值

    • json格式

      json格式解释请见下方示例

##示例

###请求URL

GET http://api.lcff.com/direct_messages/conversation_list.json?mode=lite&count=1

###返回结果 [ {dm: {id: "-SVsfHE_1RU", text: "asdf", sender_id: "zengke", recipient_id: "moon", created_at: "Wed Nov 02 07:49:55 +0000 2011", sender_screen_name: "曾科", recipient_screen_name: "穆荣均", sender: {id: "zengke", name: "曾科", screen_name: "曾科", location: "", gender: "", birthday: "", description: "mujixx", profile_image_url: "http://avatar1.fanfou.com/s0/00/bm/pt.jpg?1320216698", profile_image_url_large: "http://avatar1.fanfou.com/l0/00/bm/pt.jpg?1320216698", url: "", protected: true, followers_count: 0, friends_count: 0, favourites_count: 0, statuses_count: 0, following: true, notifications: true, created_at: "Mon Oct 06 11:03:08 +0000 2008", utc_offset: 28800 }, recipient: {id: "moon", name: "穆荣均", screen_name: "穆荣均", location: "北京", gender: "男", birthday: "", description: "..", profile_image_url: "http://avatar.fanfou.com/s0/00/3e/r4.jpg?1319098444", profile_image_url_large: "http://avatar.fanfou.com/l0/00/3e/r4.jpg?1319098444", url: "", protected: false, followers_count: 0, friends_count: 0, favourites_count: 0, statuses_count: 0, following: false, notifications: false, created_at: "Sat May 12 15:58:58 +0000 2007", utc_offset: 28800 } }, otherid: "zengke", msg_num: 11, new_conv: true } ]

###字段说明

字段返回值 字段类型 字段说明
dm direct message object 私信信息,格式参见direct-messages.new
otherid string 此对话中另一用户id
msg_num int 此对话中私信数量
new_conv boolean 此对话中是否包含未读私信
Clone this wiki locally