public final class RegionQuery extends CensusRankQuery<RegionQuery,Region,RegionShard>
shardsgeneralRateLimiter, resourceValueuserAgent| Constructor and Description |
|---|
RegionQuery(IXmlConverter xmlConverter,
IRateLimiter generalRateLimiter,
IRateLimiter scrapingRateLimiter,
String baseUrl,
String userAgent,
int apiVersion,
String regionName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildURL()
Generates a String URL based on the supplied values.
|
RegionQuery |
messagesFromId(long id)
Sets the id of the post to start from.
|
RegionQuery |
messagesLimit(int limit)
Sets the maximum number of posts to retrieve, or the maximum number of
results to return for MostLiked, MostLikes, or MostPosts to retrieve.
|
RegionQuery |
messagesOffset(int offset)
Sets the offset for the 10 most recent regional messages.
|
RegionQuery |
postsFrom(long postsFrom)
Sets the earliest epoch date of messages to take into account for
MostPosts, MostLiked, and MostLikes shards.
|
RegionQuery |
postsTo(long postsTo)
Sets the latest epoch date of messages to take into account for
MostPosts, MostLiked, and MostLikes shards.
|
protected String |
resourceString()
Gives the resource string of this Query, e.g.
|
protected void |
validateQueryParameters()
Validates the query parameters before executing the query.
|
censusRanksStartcensusHistoryFrom, censusHistoryTo, censusIds, censusModesshardsexecute, getRateLimiter, slowModecloseInputStreamQuietly, execute, makeRequest, translateResponsepublic RegionQuery(IXmlConverter xmlConverter, IRateLimiter generalRateLimiter, IRateLimiter scrapingRateLimiter, String baseUrl, String userAgent, int apiVersion, String regionName)
xmlConverter - generalRateLimiter - scrapingRateLimiter - baseUrl - userAgent - apiVersion - regionName - name of the region to querypublic final RegionQuery messagesOffset(int offset)
offset - the offset for the 10 most recent regional messagespublic final RegionQuery messagesFromId(long id)
id - the id of the post to start frompublic final RegionQuery messagesLimit(int limit)
limit - maximum number of posts or results to retrievepublic final RegionQuery postsFrom(long postsFrom)
postsFrom - earliest epoch date of messages to take into accountpublic final RegionQuery postsTo(long postsTo)
postsTo - latest epoch date of messages to take into accountprotected String resourceString()
APIQueryresourceString in class APIQuery<RegionQuery,Region>protected void validateQueryParameters()
AbstractQueryvalidateQueryParameters in class APIQuery<RegionQuery,Region>protected String buildURL()
AbstractQuerybuildURL in class CensusRankQuery<RegionQuery,Region,RegionShard>Copyright © 2017. All rights reserved.