Example usage for twitter4j User getCreatedAt

List of usage examples for twitter4j User getCreatedAt

Introduction

In this page you can find the example usage for twitter4j User getCreatedAt.

Prototype

Date getCreatedAt();

Source Link

Usage

From source file:Utils.ConvertUsers.java

License:Open Source License

public Set<TwitterUser> convertAll(Set<User> users) {

    Set<TwitterUser> twitterUsers = new HashSet();
    TwitterUser twitterUser;/*  www.j a v  a2  s.  c  om*/

    for (User user : users) {
        twitterUser = new TwitterUser();
        twitterUser.setCreated_at(user.getCreatedAt());
        twitterUser.setDescription(user.getDescription());
        twitterUser.setFollowers_count(user.getFollowersCount());
        twitterUser.setLang(user.getLang());
        twitterUser.setLocation(user.getLocation());
        twitterUser.setName(user.getName());
        twitterUser.setProfile_image_url(user.getProfileImageURL());
        twitterUser.setScreen_name(user.getScreenName());
        twitterUser.setIdTwitter(user.getId());
        twitterUser.setFriends_count(user.getFriendsCount());
        twitterUser.setProfile_banner_url(user.getProfileBannerURL());
        twitterUsers.add(twitterUser);
    }
    return twitterUsers;
}

From source file:Utils.ConvertUsers.java

License:Open Source License

public TwitterUser convertOne(User user) {

    TwitterUser twitterUser;//from  ww  w  .  ja  v  a2 s  .co  m

    twitterUser = new TwitterUser();
    twitterUser.setCreated_at(user.getCreatedAt());
    twitterUser.setDescription(user.getDescription());
    twitterUser.setFollowers_count(user.getFollowersCount());
    twitterUser.setLang(user.getLang());
    twitterUser.setLocation(user.getLocation());
    twitterUser.setName(user.getName());
    twitterUser.setProfile_image_url(user.getProfileImageURL());
    twitterUser.setScreen_name(user.getScreenName());
    twitterUser.setIdTwitter(user.getId());
    twitterUser.setFriends_count(user.getFriendsCount());
    twitterUser.setProfile_banner_url(user.getProfileBannerURL());

    return twitterUser;
}