Twitterメモ

■参考リンク

Twitter4j逆引きリファレンス【使い方 やりたいことから見つける】
http://www.synaesthesia.jp/twitter4j/gyakubiki.php



      • 引用
非同期処理を行う方法にAsyncTaskを使う方法があります。
AsyncTaskを使うとThreadやRunnableを意識することなく、 メインスレッドとは別のスレッドで処理を行うことができます。
非同期処理中であってもメインスレッドでの処理が可能です。

非同期処理を行う際、Handlerクラスを使って画面更新処理を行うと 少しコードが煩雑になってしまいますが、
AsyncTaskクラスを使うとそのような事がなく、 非同期処理と画面更新処理を行うことができます。


■リストの取得(旧バージョン
http://d.hatena.ne.jp/Tomato-360/20110831/1314798582


interface TimelinesResources
    • タイムライン
getHomeTimeline()
getHomeTimeline(Paging paging)

    • 自分宛のツイート
getMentionsTimeline()
getMentionsTimeline(Paging paging)

    • 自分のツイート
getRetweetsOfMe()
getRetweetsOfMe(Paging paging)

    • 指定したIDのツイート?
getUserTimeline()
getUserTimeline(long userId)
getUserTimeline(long userId, Paging paging)
getUserTimeline(Paging paging)
getUserTimeline(String screenName)
getUserTimeline(String screenName, Paging paging)

戻り値はみなこれ

ResponseList<Status>


User twitter4j.api.UsersResources.showUser(String arg0) throws TwitterException

User showUser(long userId)
User showUser(String screenName)



twitter4j.api
Interface ListsResources

新しいリストを作成する。(リスト名、公開か非公開か、概要)
UserList createUserList(String listName, boolean isPublicList, String description)
リストに新規ユーザを追加する。(リストID、ユーザID)?
UserList createUserListMember(long listId, long userId)
 Adds a member to a list.
UserList createUserListMember(long ownerId, String slug, long userId)
 Adds a member to a list.
UserList createUserListMember(String ownerScreenName, String slug, long userId)
 Adds a member to a list.

リストに新規ユーザを100人?までまとめて追加する。(リストID、ユーザID[配列])?
以前はaddUserListMembersを使っていたが現在はこれらしい。知らなくて大変だった。
UserList createUserListMembers(long listId, long[] userIds)
 Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.

UserList createUserListMembers(long listId, String[] screenNames)
 Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
UserList createUserListMembers(long ownerId, String slug, long[] userIds)
 Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
UserList createUserListMembers(long ownerId, String slug, String[] screenNames)
 Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
UserList createUserListMembers(String ownerScreenName, String slug, long[] userIds)
 Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
UserList createUserListMembers(String ownerScreenName, String slug, String[] screenNames)
 Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
UserList createUserListSubscription(long listId)
 Make the authenticated user follow the specified list.
UserList createUserListSubscription(long ownerId, String slug)
 Make the authenticated user follow the specified list.
UserList createUserListSubscription(String ownerScreenName, String slug)
 Make the authenticated user follow the specified list.
UserList destroyUserList(long listId)
 Deletes the specified list.
UserList destroyUserList(long ownerId, String slug)
 Deletes the specified list.
UserList destroyUserList(String ownerScreenName, String slug)
 Deletes the specified list.
UserList destroyUserListMember(long listId, long userId)
 Removes the specified member from the list.
UserList destroyUserListMember(long listId, String screenName)
 Removes the specified members from the list.
UserList destroyUserListMember(long ownerId, String slug, long userId)
 Removes the specified member from the list.
UserList destroyUserListMember(String ownerScreenName, String slug, long userId)
 Removes the specified member from the list.
UserList destroyUserListMembers(long listId, long[] userIds)
 Removes the specified members from the list.
UserList destroyUserListMembers(long listId, String[] screenNames)
 Removes the specified members from the list.
UserList destroyUserListMembers(String ownerScreenName, String slug, String[] screenNames)
 Removes the specified members from the list.
UserList destroyUserListSubscription(long listId)
 Unsubscribes the authenticated user form the specified list.
UserList destroyUserListSubscription(long ownerId, String slug)
 Unsubscribes the authenticated user form the specified list.
UserList destroyUserListSubscription(String ownerScreenName, String slug)
 Unsubscribes the authenticated user form the specified list.
PagableResponseList<User> getUserListMembers(long listId, long cursor)
 Returns the members of the specified list.
PagableResponseList<User> getUserListMembers(long ownerId, String slug, long cursor)
 Returns the members of the specified list.
PagableResponseList<User> getUserListMembers(String ownerScreenName, String slug, long cursor)
 Returns the members of the specified list.
PagableResponseList<UserList> getUserListMemberships(long cursor)
 List the lists the authenticating user has been added to.
PagableResponseList<UserList> getUserListMemberships(long listMemberId, long cursor)
 List the lists the specified user has been added to.
PagableResponseList<UserList> getUserListMemberships(long listMemberId, long cursor, boolean filterToOwnedLists)
 List the lists the specified user has been added to.
PagableResponseList<UserList> getUserListMemberships(String listMemberScreenName, long cursor)
 List the lists the specified user has been added to.
PagableResponseList<UserList> getUserListMemberships(String listMemberScreenName, long cursor, boolean filterToOwnedLists)
 List the lists the specified user has been added to.

引数(ユーザID)で指定したユーザのリスト一覧を取得
ResponseList<UserList> getUserLists(long listOwnerUserId)
 List the lists of the specified user.

引数(スクリーンネーム)で指定したユーザのリスト一覧を取得
ResponseList<UserList> getUserLists(String listOwnerScreenName)
 List the lists of the specified user.

PagableResponseList<UserList> getUserListsOwnerships(long listOwnerId, int count, long cursor)
 Returns the lists owned by the specified Twitter user.
PagableResponseList<UserList> getUserListsOwnerships(String listOwnerScreenName, int count, long cursor)
 Returns the lists owned by the specified Twitter user.
ResponseList<Status> getUserListStatuses(long listId, Paging paging)
 Show tweet timeline for members of the specified list.
ResponseList<Status> getUserListStatuses(long ownerId, String slug, Paging paging)
 Show tweet timeline for members of the specified list.
ResponseList<Status> getUserListStatuses(String ownerScreenName, String slug, Paging paging)
 Show tweet timeline for members of the specified list.
PagableResponseList<User> getUserListSubscribers(long listId, long cursor)
 Returns the subscribers of the specified list.
PagableResponseList<User> getUserListSubscribers(long ownerId, String slug, long cursor)
 Returns the subscribers of the specified list.
PagableResponseList<User> getUserListSubscribers(String ownerScreenName, String slug, long cursor)
 Returns the subscribers of the specified list.
PagableResponseList<UserList> getUserListSubscriptions(String listOwnerScreenName, long cursor)
 List the lists the specified user follows.
UserList showUserList(long listId)
 Show the specified list.
UserList showUserList(long ownerId, String slug)
 Show the specified list.
UserList showUserList(String ownerScreenName, String slug)
 Show the specified list.
User showUserListMembership(long listId, long userId)
 Check if a user is a member of the specified list.
 This method calls https://api.twitter.com/1.1/lists/members/show.json
User showUserListMembership(long ownerId, String slug, long userId)
 Check if a user is a member of the specified list.
 This method calls https://api.twitter.com/1.1/lists/members/show.json
User showUserListMembership(String ownerScreenName, String slug, long userId)
 Check if a user is a member of the specified list.
 This method calls https://api.twitter.com/1.1/lists/members/show.json
User showUserListSubscription(long listId, long userId)
 Check if the specified user is a subscriber of the specified list.
User showUserListSubscription(long ownerId, String slug, long userId)
 Check if the specified user is a subscriber of the specified list.
User showUserListSubscription(String ownerScreenName, String slug, long userId)
 Check if the specified user is a subscriber of the specified list.
UserList updateUserList(long listId, String newListName, boolean isPublicList, String newDescription)
 Updates the specified list.
UserList updateUserList(long ownerId, String slug, String newListName, boolean isPublicList, String newDescription)
 Updates the specified list.
UserList updateUserList(String ownerScreenName, String slug, String newListName, boolean isPublicList, String newDescription)
 Updates the specified list.


twitter4j
Interface User

String getBiggerProfileImageURL()
String getBiggerProfileImageURLHttps()
Date getCreatedAt()
String getDescription()
 Returns the description of the user
URLEntity[] getDescriptionURLEntities()
 Returns URL entities for user description.
int getFavouritesCount()
int getFollowersCount()
 Returns the number of followers
int getFriendsCount()
 Returns the number of users the user follows (AKA "followings")
long getId()
 Returns the id of the user
String getLang()
 Returns the preferred language of the user
int getListedCount()
 Returns the number of public lists the user is listed on, or -1 if the count is unavailable.
String getLocation()
 Returns the location of the user
String getMiniProfileImageURL()
String getMiniProfileImageURLHttps()
String getName()
 Returns the name of the user
String getOriginalProfileImageURL()
String getOriginalProfileImageURLHttps()
String getProfileBackgroundColor()
String getProfileBackgroundImageURL()
String getProfileBackgroundImageUrlHttps()
String getProfileBannerIPadRetinaURL()
String getProfileBannerIPadURL()
String getProfileBannerMobileRetinaURL()
String getProfileBannerMobileURL()
String getProfileBannerRetinaURL()
String getProfileBannerURL()
String getProfileImageURL()
 Returns the profile image url of the user
String getProfileImageURLHttps()
String getProfileLinkColor()
String getProfileSidebarBorderColor()
String getProfileSidebarFillColor()
String getProfileTextColor()
String getScreenName()
 Returns the screen name of the user
Status getStatus()
 Returns the current status of the user
 This can be null if the instance if from Status.getUser().
int getStatusesCount()
String getTimeZone()
String getURL()
 Returns the url of the user
URLEntity getURLEntity()
 Returns URL entity for user's URL.
int getUtcOffset()
boolean isContributorsEnabled()
 Tests if the user is enabling contributors
boolean isDefaultProfile()
 Tests if the user has not altered the theme or background
boolean isDefaultProfileImage()
 Tests if the user has not uploaded their own avatar
boolean isFollowRequestSent()
 Returns true if the authenticating user has requested to follow this user, otherwise false.
boolean isGeoEnabled()
boolean isProfileBackgroundTiled()
boolean isProfileUseBackgroundImage()
boolean isProtected()
 Test if the user status is protected
boolean isShowAllInlineMedia()
boolean isTranslator()
boolean isVerified()



twitter4j
Interface UserList

Date getCreatedAt()
String getDescription()
String getFullName()
long getId()
int getMemberCount()
String getName()
String getSlug()
int getSubscriberCount()
URI getURI()
User getUser()
boolean isFollowing()
boolean isPublic()

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

最終更新:2014年11月21日 09:54