Friendships/destroy (升级)
(创建新页面为 '== friendships/destroy == 取消关注某用户。成功则返回被取消关注人的资料,失败则返回一条字符串的说明。 === URL=== http://api.t.sina.com.cn/fr…') |
(→friendships/destroy) |
||
第1行: | 第1行: | ||
== friendships/destroy == | == friendships/destroy == | ||
− | + | 升级移除关注接口 | |
=== URL=== | === URL=== | ||
− | http://api.t.sina.com.cn/friendships/destroy | + | http://api.t.sina.com.cn/friendships/destroy.format |
===格式=== | ===格式=== | ||
第19行: | 第19行: | ||
===请求参数=== | ===请求参数=== | ||
下面的参数必须有其中一个: | 下面的参数必须有其中一个: | ||
− | * | + | *is_follower:可选参数,默认为0。1表示为移除粉丝,0表示为取消关注。 |
− | o 示例: http://api.t.sina.com.cn/friendships/destroy | + | o 示例: http://api.t.sina.com.cn/friendships/destroy.json?is_follower=0 |
− | * user_id. | + | * user_id. 可选参数. 用户UID |
o 示例: http://api.t.sina.com.cn/friendships/destroy.xml?user_id=1401881 | o 示例: http://api.t.sina.com.cn/friendships/destroy.xml?user_id=1401881 | ||
− | * screen_name. | + | * screen_name. 可选参数.用户微薄昵称。 |
o 示例: http://api.t.sina.com.cn/friendships/destroy.xml?screen_name=101010 | o 示例: http://api.t.sina.com.cn/friendships/destroy.xml?screen_name=101010 | ||
第188行: | 第188行: | ||
* xml: | * xml: | ||
− | curl -u user:password -d "" http://api.t.sina.com.cn/friendships/destroy | + | curl -u user:password -d "" http://api.t.sina.com.cn/friendships/destroy.xml |
* json: | * json: | ||
− | curl -u user:password -d "" http://api.t.sina.com.cn/friendships/destroy | + | curl -u user:password -d "" http://api.t.sina.com.cn/friendships/destroy.json |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
2010年10月19日 (二) 11:56的版本
目录 |
friendships/destroy
升级移除关注接口
URL
http://api.t.sina.com.cn/friendships/destroy.format
格式
xml, json
HTTP请求方式
POST, DELETE
是否需要身份验证
true
请求数限制
false
请求参数
下面的参数必须有其中一个:
- is_follower:可选参数,默认为0。1表示为移除粉丝,0表示为取消关注。
o 示例: http://api.t.sina.com.cn/friendships/destroy.json?is_follower=0
- user_id. 可选参数. 用户UID
o 示例: http://api.t.sina.com.cn/friendships/destroy.xml?user_id=1401881
- screen_name. 可选参数.用户微薄昵称。
o 示例: http://api.t.sina.com.cn/friendships/destroy.xml?screen_name=101010
返回结果
XML
<?xml version="1.0" encoding="UTF-8"?> <user> <id>1266321801</id> <screen_name>姚晨</screen_name> <name>姚晨</name> <province>11</province> <city>5</city> <location>北京 朝阳区</location> <description>一颗很逊的卤蛋。</description> <url>http://blog.sina.com.cn/yaochen</url> <profile_image_url>http://tp2.sinaimg.cn/1266321801/50/1283203855</profile_image_url> <domain>yaochen</domain> <gender>f</gender> <followers_count>2787856</followers_count> <friends_count>561</friends_count> <statuses_count>2148</statuses_count> <favourites_count>10</favourites_count> <created_at>Fri Aug 28 00:00:00 +0800 2009</created_at> <following>false</following> <verified>true</verified> <allow_all_act_msg>false</allow_all_act_msg> <geo_enabled>false</geo_enabled> <status> <created_at>Fri Sep 10 09:47:00 +0800 2010</created_at> <id>2465393025</id> <text>愿我永远不要失去给他人带来快乐的能力,因为失去它,自己也不可能再拥有快乐。</text> <source> <a href="http://news.sina.com.cn/wap/wbclient.html#3">iPhone客户端</a> </source> <favorited>false</favorited> <truncated>false</truncated> <geo/> <in_reply_to_status_id/> <in_reply_to_user_id/> <in_reply_to_screen_name/> <retweeted_status> <created_at>Fri Sep 10 08:00:03 +0800 2010</created_at> <id>2463041144</id> <text>许多人知道如何享乐,却不知道自己从何时起已不再向别人提供欢乐。(BY阿瑟·赫尔普斯)早安,各位。</text> <source> <a href="http://t.sina.com.cn">新浪微博</a> </source> <favorited>false</favorited> <truncated>false</truncated> <geo/> <in_reply_to_status_id/> <in_reply_to_user_id/> <in_reply_to_screen_name/> <thumbnail_pic>http://ss16.sinaimg.cn/thumbnail/62914aabt8fdc6a2f6c0f&690</thumbnail_pic> <bmiddle_pic>http://ss16.sinaimg.cn/bmiddle/62914aabt8fdc6a2f6c0f&690</bmiddle_pic> <original_pic>http://ss16.sinaimg.cn/orignal/62914aabt8fdc6a2f6c0f&690</original_pic> <user> <id>1653689003</id> <screen_name>新周刊</screen_name> <name>新周刊</name> <province>44</province> <city>1</city> <location>广东 广州</location> <description>《新周刊》,中国最新锐的时事生活周刊:观点供应商,视觉开发商,资讯整合商,传媒运营商。</description> <url>http://blog.sina.com.cn/xinzhoukan</url> <profile_image_url>http://tp4.sinaimg.cn/1653689003/50/1283204286</profile_image_url> <domain>neweekly</domain> <gender>m</gender> <followers_count>559667</followers_count> <friends_count>203</friends_count> <statuses_count>5748</statuses_count> <favourites_count>10</favourites_count> <created_at>Wed Oct 14 00:00:00 +0800 2009</created_at> <following>false</following> <verified>true</verified> <allow_all_act_msg>false</allow_all_act_msg> <geo_enabled>false</geo_enabled> </user> </retweeted_status> </status> </user>
JSON
{ "id":1266321801, "screen_name":"姚晨", "name":"姚晨", "province":"11", "city":"5", "location":"北京 朝阳区", "description":"一颗很逊的卤蛋。", "url":"http://blog.sina.com.cn/yaochen", "profile_image_url":"http://tp2.sinaimg.cn/1266321801/50/1283203855", "domain":"yaochen", "gender":"f", "followers_count":2787035, "friends_count":561, "statuses_count":2148, "favourites_count":10, "created_at":"Fri Aug 28 00:00:00 +0800 2009", "following":false, "allow_all_act_msg":false, "geo_enabled":false, "verified":true, "status":{ "created_at":"Fri Sep 10 09:47:00 +0800 2010", "id":2465393025, "text":"愿我永远不要失去给他人带来快乐的能力,因为失去它,自己也不可能再拥有快乐。", "source":"<a href=\"http://news.sina.com.cn/wap/wbclient.html#3\" rel=\"nofollow\">iPhone客户端</a>", "favorited":false, "truncated":false, "in_reply_to_status_id":"", "in_reply_to_user_id":"", "in_reply_to_screen_name":"", "geo":null, "retweeted_status":{ "created_at":"Fri Sep 10 08:00:03 +0800 2010", "id":2463041144, "text":"许多人知道如何享乐,却不知道自己从何时起已不再向别人提供欢乐。(BY阿瑟·赫尔普斯)早安,各位。", "source":"<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微博</a>", "favorited":false, "truncated":false, "in_reply_to_status_id":"", "in_reply_to_user_id":"", "in_reply_to_screen_name":"", "thumbnail_pic":"http://ss16.sinaimg.cn/thumbnail/62914aabt8fdc6a2f6c0f&690", "bmiddle_pic":"http://ss16.sinaimg.cn/bmiddle/62914aabt8fdc6a2f6c0f&690", "original_pic":"http://ss16.sinaimg.cn/orignal/62914aabt8fdc6a2f6c0f&690", "geo":null, "user":{ "id":1653689003, "screen_name":"新周刊", "name":"新周刊", "province":"44", "city":"1", "location":"广东 广州", "description":"《新周刊》,中国最新锐的时事生活周刊:观点供应商,视觉开发商,资讯整合商,传媒运营商。", "url":"http://blog.sina.com.cn/xinzhoukan", "profile_image_url":"http://tp4.sinaimg.cn/1653689003/50/1283204286", "domain":"neweekly", "gender":"m", "followers_count":559667, "friends_count":203, "statuses_count":5748, "favourites_count":10, "created_at":"Wed Oct 14 00:00:00 +0800 2009", "following":false, "allow_all_act_msg":false, "geo_enabled":false, "verified":true } } } }
字段说明 - user
- id: 用户UID
- screen_name: 微博昵称
- name: 友好显示名称,同微博昵称
- province: 省份编码(参考省份编码表)
- city: 城市编码(参考城市编码表)
- location:地址
- description: 个人描述
- url: 用户博客地址
- profile_image_url: 自定义图像
- domain: 用户个性化URL
- gender: 性别,m--男,f--女,n--未知
- followers_count: 粉丝数
- friends_count: 关注数
- statuses_count: 微博数
- favourites_count: 收藏数
- created_at: 创建时间
- following: 是否已关注(此特性暂不支持)
- verified: 加V标示,是否微博认证用户
字段说明 - status
- created_at: 创建时间
- id: 微博ID
- text: 微博信息内容
- source: 微博来源
- favorited: 是否已收藏
- truncated: 是否被截断
- in_reply_to_status_id: 回复ID
- in_reply_to_user_id: 回复人UID
- in_reply_to_screen_name: 回复人昵称
- thumbnail_pic: 缩略图
- bmiddle_pic: 中型图片
- original_pic:原始图片
- user: 作者信息
- retweeted_status: 转发的博文,内容为status,如果不是转发,则没有此字段
使用示例
- xml:
curl -u user:password -d "" http://api.t.sina.com.cn/friendships/destroy.xml
- json:
curl -u user:password -d "" http://api.t.sina.com.cn/friendships/destroy.json