Spring Social Twitter

org.springframework.social.twitter.api
Class StatusDetails

java.lang.Object
  extended by org.springframework.social.twitter.api.StatusDetails

public class StatusDetails
extends java.lang.Object

Carries optional metadata pertaining to a Twitter status update.

Author:
Craig Walls

Constructor Summary
StatusDetails()
           
 
Method Summary
 StatusDetails setDisplayCoordinates(boolean displayCoordinates)
          Indicates that Twitter should pinpoint the location precisely when displaying it on a map.
 StatusDetails setInReplyToStatusId(long inReplyToStatusId)
          Sets the ID of an existing status that this status is in reply to.
 StatusDetails setLocation(float latitude, float longitude)
          Sets the location of the status update in latitude and longitude.
 StatusDetails setWrapLinks(boolean wrapLinks)
           
 org.springframework.util.MultiValueMap<java.lang.String,java.lang.Object> toParameterMap()
          Maps the StatusDetails values to a Map of Twitter parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusDetails

public StatusDetails()
Method Detail

setInReplyToStatusId

public StatusDetails setInReplyToStatusId(long inReplyToStatusId)
Sets the ID of an existing status that this status is in reply to. Will be ignored unless the text of this status includes the author of the existing status (e.g., "@author").

Parameters:
inReplyToStatusId - the ID of an existing status that this status is in reply to.
Returns:
the StatusDetails object

setLocation

public StatusDetails setLocation(float latitude,
                                 float longitude)
Sets the location of the status update in latitude and longitude. Latitude values must be between -90.0 (south) and +90.0 (north). Longitude values must be between -180.0 (west) and +180.0 (east). For example, latitude=51.502 and longitude=-0.126 are the coordinates for Westminster, London.

Parameters:
latitude - The latitude element of the location. Must be between -90.0 and +90.0, where positive values are north and negative values are south.
longitude - The longitude element of the location. Must be between -180.0 and +180.0, where positive values are east and negative values are west.
Returns:
The StatusDetails object

setDisplayCoordinates

public StatusDetails setDisplayCoordinates(boolean displayCoordinates)
Indicates that Twitter should pinpoint the location precisely when displaying it on a map. By default, Twitter will display the status along with a map showing the general area where the tweet came from. If display coordinates is true, however, it will display a map with a pin indicating the precise location of the status update.

Parameters:
displayCoordinates - If true, will pinpoint the location of the status update.
Returns:
The StatusDetails object

setWrapLinks

public StatusDetails setWrapLinks(boolean wrapLinks)

toParameterMap

public org.springframework.util.MultiValueMap<java.lang.String,java.lang.Object> toParameterMap()
Maps the StatusDetails values to a Map of Twitter parameters.

Returns:
A Map of parameters to be passed along in the status update post to Twitter.

Spring Social Twitter