Example usage for twitter4j UserList isFollowing

List of usage examples for twitter4j UserList isFollowing

Introduction

In this page you can find the example usage for twitter4j UserList isFollowing.

Prototype

boolean isFollowing();

Source Link

Document

Returns if the authenticated user is following the list

Usage

From source file:com.dwdesign.tweetings.model.ParcelableUserList.java

License:Open Source License

public ParcelableUserList(final UserList list, final long account_id, final long position) {
    final User user = list.getUser();
    this.position = position;
    this.account_id = account_id;
    list_id = list.getId();/*from w  w  w.  ja v a  2s  .  c o  m*/
    is_public = list.isPublic();
    is_following = list.isFollowing();
    name = list.getName();
    description = list.getDescription();
    user_id = user.getId();
    user_name = user.getName();
    user_screen_name = user.getScreenName();
    user_profile_image_url = user.getProfileImageURL();
    user_profile_image_url_string = parseString(user_profile_image_url);
}

From source file:com.javielinux.api.loaders.UserListsLoader.java

License:Apache License

@Override
public BaseResponse loadInBackground() {

    try {//from   www .jav a 2s .c o m
        UserListsResponse response = new UserListsResponse();

        ConnectionManager.getInstance().open(getContext());

        response.action = request.getAction();
        response.addUser = request.getAddUser();

        if (request.getAction() == SHOW_TWEETS) {
            response.setUserList(ConnectionManager.getInstance().getUserForSearchesTwitter()
                    .getUserLists(request.getUser()));
        } else if (request.getAction() == SHOW_TWEETS_FOLLOWINGLIST) {
            response.setUserList(ConnectionManager.getInstance().getUserForSearchesTwitter()
                    .getUserListMemberships(request.getUser(), -1));
        } else {
            ResponseList<UserList> responseList = ConnectionManager.getInstance().getUserForSearchesTwitter()
                    .getUserLists(request.getUser());
            ArrayList<UserList> deleteList = new ArrayList<UserList>();

            for (UserList ul : responseList) {
                if (ul.isFollowing())
                    deleteList.add(ul);
            }

            responseList.removeAll(deleteList);
            response.setUserList(responseList);
        }

        return response;
    } catch (TwitterException e) {
        e.printStackTrace();
        ErrorResponse response = new ErrorResponse();
        response.setError(e, e.getMessage());
        return response;
    }
}

From source file:de.vanita5.twittnuker.loader.support.BaseUserListsLoader.java

License:Open Source License

protected boolean isFollowing(final UserList list) {
    return list.isFollowing();
}

From source file:de.vanita5.twittnuker.model.ParcelableUserList.java

License:Open Source License

public ParcelableUserList(final UserList list, final long account_id, final long position) {
    this(list, account_id, position, list.isFollowing());
}

From source file:org.tweetalib.android.model.TwitterList.java

License:Apache License

public TwitterList(UserList list) {
    mId = list.getId();/*from  w  ww.  j a  v a  2s  .c o  m*/
    mName = list.getName();
    mFullName = list.getFullName();
    mDescription = list.getDescription();
    mIsPublic = list.isPublic();
    mIsFollowing = list.isFollowing();
    mMemberCount = list.getMemberCount();
    mSubscriberCount = list.getSubscriberCount();
}