public class TwitterSearchReader extends TwitterReader
This reader uses the Twitter Search API and supports all Query Operators.
Record { 0:[Id]:LONG=[509084459472551936]:Long 1:[Text]:STRING=[+ @Squarespace & @Shutterstock MT @NewYork_CM: #TY again @Freshbooks & @MailChimp for #CreativeMornings! https://t.co/aW7cdAMyYW...140]:String 2:[Lang]:STRING=[en]:String 3:[CreatedAt]:DATETIME=[Mon Sep 08 17:02:48 EDT 2014]:Date 4:[FavoriteCount]:INT=[1]:Integer 5:[RetweetCount]:INT=[0]:Integer 6:[InReplyToScreenName]:STRING=[NewYork_CM]:String 7:[UserScreenName]:STRING=[mitgc_cm]:String 8:[UserDescription]:STRING=[#Socbiz strat + #Lean venture dev | @Plus_SocialGood Connector | #socent #impinv #sustdev | @StartingBloc #SocInn | NY exec prod...157]:String 9:[UserCreatedAt]:DATETIME=[Mon Nov 28 21:09:22 EST 2011]:Date 10:[UserTweets]:INT=[42485]:Integer 11:[UserFavouritesCount]:INT=[13329]:Integer 12:[UserFollowersCount]:INT=[6598]:Integer 13:[UserFollowingCount]:INT=[6912]:Integer 14:[UserLocation]:STRING=[New York, New York, USA]:String 15:[UserLang]:STRING=[en]:String 16:[UserTimeZone]:STRING=[London]:String 17:[UserUtcOffset]:INT=[3600]:Integer 18:[UserURL]:STRING=[http://t.co/D8ykYnFD3I]:String 19:[GeoLocationLatitude]:DOUBLE=[40.7450718]:Double 20:[GeoLocationLongitude]:DOUBLE=[-73.9964114]:Double 21:[PlaceName]:STRING=[Manhattan]:String 22:[PlaceFullName]:STRING=[Manhattan, NY]:String 23:[PlaceType]:STRING=[city]:String 24:[PlaceStreetAddress]:UNDEFINED=[null] 25:[PlaceCountryCode]:STRING=[US]:String 26:[PlaceCountry]:STRING=[United States]:String 27:[PlaceBoundingBoxType]:STRING=[Polygon]:String 28:[PlaceBoundingBoxCoordinates]:STRING=[[[40.683935,-74.026675],[40.683935,-73.910408],[40.877483,-73.910408],[40.877483,-74.026675]]]:String 29:[UserMentionEntities]:STRING=[@Squarespace @Shutterstock @NewYork_CM @freshbooks @MailChimp @mitgc_cm]:String 30:[HashtagEntities]:STRING=[#TY #CreativeMornings]:String 31:[URLEntities]:STRING=[https://pbs.twimg.com/media/BwxyTHtIQAAKDUz.jpg]:String 32:[MediaEntities]:UNDEFINED=[null] }
DataEndpoint.State
EOF
fieldLineage, recordLineage
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEY
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZE
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
TwitterSearchReader(String consumerKey,
String consumerSecret,
String searchQuery,
int maxResults) |
TwitterSearchReader(String consumerKey,
String consumerSecret,
String accessToken,
String accessTokenSecret,
String searchQuery,
int maxResults) |
TwitterSearchReader(TwitterProvider provider,
String searchQuery,
int maxResults) |
Modifier and Type | Method and Description |
---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException . |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
long |
getMaxId()
Searches for tweets with IDs less than the specified ID (i.e.
|
long |
getSinceId()
Searches for tweets with IDs greater than the specified ID (i.e.
|
void |
open()
Makes this endpoint ready for reading or writing.
|
protected Record |
readImpl()
Overridden by subclasses to read the next record from this
DataReader . |
TwitterSearchReader |
setApiLimitPolicy(IApiLimitPolicy apiLimitPolicy) |
TwitterSearchReader |
setMaxId(long maxId)
Searches for tweets with IDs less than the specified ID (i.e.
|
TwitterSearchReader |
setSinceId(long sinceId)
Searches for tweets with IDs greater than the specified ID (i.e.
|
getApiLimitPolicy, getConverter, getEntityExpansionPolicy, getProvider, getRateLimit, getRateLimit, isRateLimitExceeded, onRateLimitExceeded, reloadRateLimit, setConverter, setEntityExpansionPolicy, setRateLimit, setRateLimit, setRateLimitExceeded
addLineage, available, getBufferSize, getNestedEndpoint, getNestedReader, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, read, setSaveLineage, skip
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toString
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
public TwitterSearchReader(TwitterProvider provider, String searchQuery, int maxResults)
public TwitterSearchReader(String consumerKey, String consumerSecret, String searchQuery, int maxResults)
public long getMaxId()
public TwitterSearchReader setMaxId(long maxId)
public long getSinceId()
public TwitterSearchReader setSinceId(long sinceId)
public void open() throws DataException
DataEndpoint
open
in class TwitterReader
DataException
public void close() throws DataException
DataEndpoint
close
in class DataEndpoint
DataException
public TwitterSearchReader setApiLimitPolicy(IApiLimitPolicy apiLimitPolicy)
setApiLimitPolicy
in class TwitterReader
protected Record readImpl() throws Throwable
DataReader
DataReader
. The default
implementation of DataReader.read()
now insures that this method will not be called again after it returns
a null
.
If no record is available, null
will be returned.
readImpl
in class DataReader
Throwable
public DataException addExceptionProperties(DataException exception)
Endpoint
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in class TwitterReader
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.