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 |
Annotations |
getAnnotations()
Returns the annotations of the tweet. |
java.util.Date |
getCreatedAt()
returns the created_at |
java.lang.String |
getFromUser()
returns the from_user |
long |
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 |
getLocation()
Returns the textual location where this tweet was posted. |
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 |
long |
getToUserId()
returns the to_user_id |
Methods inherited from interface java.lang.Comparable |
compareTo |
getText
java.lang.String getText()
- returns the text
- Returns:
- the text
getToUserId
long 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
long 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
getLocation
java.lang.String getLocation()
- Returns the textual location where this tweet was posted. This location
is useful when no GeoLocation information is available, but must be translated
to coordinates via a GeoQuery.
- Returns:
- The textual location where this tweet was posted
getAnnotations
Annotations getAnnotations()
- Returns the annotations of the tweet.
At the moment this code is written (2010-08-18), Twitter Search API does
not support annotations yet (so even annotated tweets are returned without the annotations).
This method is included here for completeness and for future use.
- Returns:
- the annotations
- Since:
- Twitter4J 2.1.4