public final class TelegramQuery extends APIQuery<TelegramQuery,Void>
| Modifier and Type | Field and Description |
|---|---|
protected static DependantRateLimiter |
RecruitTGrateLimiter
The rate limiter for recruitment telegrams.
|
protected static DependantRateLimiter |
TGrateLimiter
The rate limiter for normal telegrams.
|
rateLimiter, resourceValuelogger| Constructor and Description |
|---|
TelegramQuery(String clientKey,
String telegramId,
String secretKey,
String nation)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildURL()
Generates a String URL based on the supplied values.
|
protected RateLimiter |
getRateLimiter()
Returns the rate limiter to use in the makeRequest()-function.
|
TelegramQuery |
isRecruitment()
Ensures the telegram will be send as if it is a recruitment telegram.
|
protected String |
resourceString()
Gives the resource string of this Query, e.g.
|
protected <T extends Void> |
translateResponse(InputStream response,
Class<T> type)
Translates the stream response to the object this Query wishes to return
via its execute() function.
|
protected void |
validateQueryParameters()
Validates the query parameters before executing the query.
|
closeInputStreamQuietly, execute, makeRequestprotected static final DependantRateLimiter TGrateLimiter
protected static final DependantRateLimiter RecruitTGrateLimiter
public TelegramQuery isRecruitment()
protected String resourceString()
APIQueryresourceString in class APIQuery<TelegramQuery,Void>protected void validateQueryParameters()
AbstractQueryvalidateQueryParameters in class AbstractQuery<TelegramQuery,Void>protected <T extends Void> T translateResponse(InputStream response, Class<T> type)
AbstractQuerytranslateResponse in class AbstractQuery<TelegramQuery,Void>T - type to parse toresponse - the response to translatetype - type to parse toprotected String buildURL()
AbstractQuerybuildURL in class APIQuery<TelegramQuery,Void>protected RateLimiter getRateLimiter()
APIQuerygetRateLimiter in class APIQuery<TelegramQuery,Void>Copyright © 2016. All rights reserved.