com.belerweb.social.qq.connect.api
Class Weibo

java.lang.Object
  extended by com.belerweb.social.API
      extended by com.belerweb.social.qq.connect.api.Weibo

public final class Weibo
extends API

腾讯微博API


Field Summary
 
Fields inherited from class com.belerweb.social.API
connect, t, weibo, weixin
 
Constructor Summary
protected Weibo(QQConnect connect)
           
 
Method Summary
 Result<FanList> getFansList(String accessToken, String openid, int reqNum, int startIndex)
          获取登录用户的听众列表。 文档地址:http://wiki.connect.qq.com/get_fanslist
 Result<FanList> getFansList(String oAuthConsumerKey, String accessToken, String openid, int reqNum, int startIndex, Boolean newMode, Integer install, Integer sex)
          获取登录用户的听众列表。 文档地址:http://wiki.connect.qq.com/get_fanslist
 Result<IdolList> getIdolList(String accessToken, String openid, int reqNum, int startIndex)
          获取登录用户收听的人的列表。 文档地址:http://wiki.connect.qq.com/get_idollist
 Result<IdolList> getIdolList(String oAuthConsumerKey, String accessToken, String openid, int reqNum, int startIndex, Boolean newMode, Integer install)
          获取登录用户收听的人的列表。 文档地址:http://wiki.connect.qq.com/get_idollist
 Result<WeiboUser> getInfo(String accessToken, String openid)
          获取腾讯微博登录用户的用户资料。 文档地址:http://wiki.connect.qq.com/get_info
 Result<WeiboUser> getInfo(String oAuthConsumerKey, String accessToken, String openid)
          获取腾讯微博登录用户的用户资料。 文档地址:http://wiki.connect.qq.com/get_info
 Result<WeiboUser> getOtherInfo(String accessToken, String openid, String name)
          获取腾讯微博其他用户详细信息。 文档地址:http://wiki.connect.qq.com/get_other_info
 Result<WeiboUser> getOtherInfo(String oAuthConsumerKey, String accessToken, String openid, String name, String fopenid)
          获取腾讯微博其他用户详细信息。 文档地址:http://wiki.connect.qq.com/get_other_info
 Result<RepostList> getRepostList(String accessToken, String openid, int flag, String rootId, int pageFlag, int pageTime, int reqNum, String twitterId)
          获取一条微博的转播或评论信息列表。 文档地址:http://wiki.connect.qq.com/get_repost_list
 Result<RepostList> getRepostList(String oAuthConsumerKey, String accessToken, String openid, int flag, String rootId, int pageFlag, int pageTime, int reqNum, String twitterId)
          获取一条微博的转播或评论信息列表。 文档地址:http://wiki.connect.qq.com/get_repost_list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Weibo

protected Weibo(QQConnect connect)
Method Detail

getInfo

public Result<WeiboUser> getInfo(String accessToken,
                                 String openid)
获取腾讯微博登录用户的用户资料。 文档地址:http://wiki.connect.qq.com/get_info

Parameters:
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。

getInfo

public Result<WeiboUser> getInfo(String oAuthConsumerKey,
                                 String accessToken,
                                 String openid)
获取腾讯微博登录用户的用户资料。 文档地址:http://wiki.connect.qq.com/get_info

Parameters:
oAuthConsumerKey - 申请QQ登录成功后,分配给应用的appid
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。

getOtherInfo

public Result<WeiboUser> getOtherInfo(String accessToken,
                                      String openid,
                                      String name)
获取腾讯微博其他用户详细信息。 文档地址:http://wiki.connect.qq.com/get_other_info

Parameters:
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
name - 其他用户的账户名。可选,name和fopenid至少选一个,若同时存在则以name值为主。

getOtherInfo

public Result<WeiboUser> getOtherInfo(String oAuthConsumerKey,
                                      String accessToken,
                                      String openid,
                                      String name,
                                      String fopenid)
获取腾讯微博其他用户详细信息。 文档地址:http://wiki.connect.qq.com/get_other_info

Parameters:
oAuthConsumerKey - 申请QQ登录成功后,分配给应用的appid
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
name - 其他用户的账户名。可选,name和fopenid至少选一个,若同时存在则以name值为主。
fopenid - 其他用户的账户名。可选,name和fopenid至少选一个,若同时存在则以name值为主。

getFansList

public Result<FanList> getFansList(String accessToken,
                                   String openid,
                                   int reqNum,
                                   int startIndex)
获取登录用户的听众列表。 文档地址:http://wiki.connect.qq.com/get_fanslist

Parameters:
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
reqNum - 必须。请求获取的听众个数。取值范围为1-30。
startIndex - 必须。请求获取听众列表的起始位置。第一页:0;继续向下翻页:reqnum*(page-1)。

getFansList

public Result<FanList> getFansList(String oAuthConsumerKey,
                                   String accessToken,
                                   String openid,
                                   int reqNum,
                                   int startIndex,
                                   Boolean newMode,
                                   Integer install,
                                   Integer sex)
获取登录用户的听众列表。 文档地址:http://wiki.connect.qq.com/get_fanslist

Parameters:
oAuthConsumerKey - 申请QQ登录成功后,分配给应用的appid
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
reqNum - 必须。请求获取的听众个数。取值范围为1-30。
startIndex - 必须。请求获取听众列表的起始位置。第一页:0;继续向下翻页:reqnum*(page-1)。
newMode - 获取听众信息的模式。获取听众信息的模式,默认值为0。0:旧模式,新添加的听众信息排在前面,最多只能拉取1000个听众的信息。1:新模式,可以拉取所有听众的信息,暂时不支持排序。
install - 判断获取的是安装应用的听众,还是未安装应用的听众。 0:不考虑该参数;1:获取已安装应用的听众信息;2:获取未安装应用的听众信息。
sex - 按性别过滤标识,默认为0。此参数当mode=0时使用,支持排序。 1:获取的是男性听众信息;2:获取的是女性听众信息;0:不进行性别过滤,获取所有听众信息。

getIdolList

public Result<IdolList> getIdolList(String accessToken,
                                    String openid,
                                    int reqNum,
                                    int startIndex)
获取登录用户收听的人的列表。 文档地址:http://wiki.connect.qq.com/get_idollist

Parameters:
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
reqNum - 必须。请求获取的听众个数。取值范围为1-30。
startIndex - 必须。请求获取听众列表的起始位置。第一页:0;继续向下翻页:reqnum*(page-1)。

getIdolList

public Result<IdolList> getIdolList(String oAuthConsumerKey,
                                    String accessToken,
                                    String openid,
                                    int reqNum,
                                    int startIndex,
                                    Boolean newMode,
                                    Integer install)
获取登录用户收听的人的列表。 文档地址:http://wiki.connect.qq.com/get_idollist

Parameters:
oAuthConsumerKey - 申请QQ登录成功后,分配给应用的appid
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
reqNum - 必须。请求获取的听众个数。取值范围为1-30。
startIndex - 必须。请求获取听众列表的起始位置。第一页:0;继续向下翻页:reqnum*(page-1)。
newMode - 获取收听的人的信息模式,默认为0。 0:旧模式,新添加的收听的人信息排在前面,最多只能拉取1000个收听的人的信息。1:新模式,最多可拉取10000个收听的人的信息,暂不支持排序。
install - 判断获取的是安装了应用的收听好友,还是未安装应用的收听好友。0:不考虑该参数;1:获取已安装应用的收听好友信息;2:获取未安装应用的收听好友信息。

getRepostList

public Result<RepostList> getRepostList(String accessToken,
                                        String openid,
                                        int flag,
                                        String rootId,
                                        int pageFlag,
                                        int pageTime,
                                        int reqNum,
                                        String twitterId)
获取一条微博的转播或评论信息列表。 文档地址:http://wiki.connect.qq.com/get_repost_list

Parameters:
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
reqNum - 必须。请求获取的听众个数。取值范围为1-30。
startIndex - 必须。请求获取听众列表的起始位置。第一页:0;继续向下翻页:reqnum*(page-1)。

getRepostList

public Result<RepostList> getRepostList(String oAuthConsumerKey,
                                        String accessToken,
                                        String openid,
                                        int flag,
                                        String rootId,
                                        int pageFlag,
                                        int pageTime,
                                        int reqNum,
                                        String twitterId)
获取一条微博的转播或评论信息列表。 文档地址:http://wiki.connect.qq.com/get_repost_list

Parameters:
oAuthConsumerKey - 申请QQ登录成功后,分配给应用的appid
accessToken - 可通过使用Authorization_Code获取Access_Token 或来获取。access_token有3个月有效期。
openid - 用户的ID,与QQ号码一一对应。
flag - 标识获取的是转播列表还是点评列表。0:获取转播列表;1:获取点评列表;2:转播列表和点评列表都获取。
rootId - 转发或点评的源微博的ID。
pageFlag - 分页标识。0:第一页;1:向下翻页;2:向上翻页。
pageTime - 分页标识。0:第一页;1:向下翻页;2:向上翻页。
reqNum - 每次请求记录的条数。取值为1-100条。
twitterId - 翻页时使用。第1-100条:0;继续向下翻页:上一次请求返回的最后一条记录id。


Copyright © 2014. All Rights Reserved.