twitter4j
Interface Tweet

All Superinterfaces:
java.lang.Comparable<Tweet>, java.io.Serializable
All Known Implementing Classes:
TweetJSONImpl

public interface Tweet
extends java.lang.Comparable<Tweet>, java.io.Serializable

A data class representing a Tweet in the search response

Author:
Yusuke Yamamoto - yusuke at mac.com

Method Summary
 java.util.Date getCreatedAt()
          returns the created_at
 java.lang.String getFromUser()
          returns the from_user
 int getFromUserId()
          returns the user id of the tweet's owner.
Warning: The user ids in the Search API are different from those in the REST API (about the two APIs).
 GeoLocation getGeoLocation()
          Returns The location that this tweet refers to if available.
 long getId()
          returns the status id of the tweet
 java.lang.String getIsoLanguageCode()
          returns the iso language code of the tweet
 java.lang.String getProfileImageUrl()
          returns the profile_image_url
 java.lang.String getSource()
          returns the source of the tweet
 java.lang.String getText()
          returns the text
 java.lang.String getToUser()
          returns the to_user
 int getToUserId()
          returns the to_user_id
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getText

java.lang.String getText()
returns the text

Returns:
the text

getToUserId

int getToUserId()
returns the to_user_id

Returns:
the to_user_id value or -1 if to_user_id is not specified by the tweet

getToUser

java.lang.String getToUser()
returns the to_user

Returns:
the to_user value or null if to_user is not specified by the tweet

getFromUser

java.lang.String getFromUser()
returns the from_user

Returns:
the from_user

getId

long getId()
returns the status id of the tweet

Returns:
the status id

getFromUserId

int getFromUserId()
returns the user id of the tweet's owner.
Warning: The user ids in the Search API are different from those in the REST API (about the two APIs). This defect is being tracked by Issue 214. This means that the to_user_id and from_user_id field vary from the actualy user id on Twitter.com. Applications will have to perform a screen name-based lookup with the users/show method to get the correct user id if necessary.

Returns:
the user id of the tweet's owner
See Also:
Issue 214: Search API "from_user_id" doesn't match up with the proper Twitter "user_id"

getIsoLanguageCode

java.lang.String getIsoLanguageCode()
returns the iso language code of the tweet

Returns:
the iso language code of the tweet or null if iso_language_code is not specified by the tweet

getSource

java.lang.String getSource()
returns the source of the tweet

Returns:
the source of the tweet

getProfileImageUrl

java.lang.String getProfileImageUrl()
returns the profile_image_url

Returns:
the profile_image_url

getCreatedAt

java.util.Date getCreatedAt()
returns the created_at

Returns:
the created_at

getGeoLocation

GeoLocation getGeoLocation()
Returns The location that this tweet refers to if available.

Returns:
returns The location that this tweet refers to if available (can be null)
Since:
Twitter4J 2.1.0