twitter4j.HelpResourcesImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twitter4j-core Show documentation
Show all versions of twitter4j-core Show documentation
A Java library for the Twitter API
package twitter4j;
import twitter4j.v1.HelpResources;
import twitter4j.v1.RateLimitStatus;
import twitter4j.v1.ResponseList;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
class HelpResourcesImpl extends APIResourceBase implements HelpResources {
HelpResourcesImpl(HttpClient http, ObjectFactory factory, String restBaseURL, Authorization auth, boolean mbeanEnabled, HttpParameter[] IMPLICIT_PARAMS,
String IMPLICIT_PARAMS_STR,
List> rateLimitStatusListeners,
List> rateLimitReachedListeners) {
super(http, factory, restBaseURL, auth, mbeanEnabled, IMPLICIT_PARAMS, IMPLICIT_PARAMS_STR, rateLimitStatusListeners, rateLimitReachedListeners);
}
/* Help Resources */
@Override
public ResponseList getLanguages() throws TwitterException {
return factory.createLanguageList(get(restBaseURL + "help/languages.json"));
}
@Override
public Map getRateLimitStatus() throws TwitterException {
return factory.createRateLimitStatuses(get(restBaseURL + "application/rate_limit_status.json"));
}
@Override
public Map getRateLimitStatus(String... resources) throws TwitterException {
return factory.createRateLimitStatuses(get(restBaseURL + "application/rate_limit_status.json?resources=" + StringUtil.join(resources)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy