public static class MCLeaksAPI.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MCLeaksAPI.Builder |
apiKey(String apiKey)
Uses an API key when making requests
Your API key defines your rate limit,
however it is not required to use the API
|
MCLeaksAPI |
build()
Builds a new MCLeaks API
|
MCLeaksAPI.Builder |
expireAfter(long expireAfter,
TimeUnit unit)
How long to keep data before requiring re-fetching.
|
MCLeaksAPI.Builder |
nocache()
Makes it so a cache is not used.
|
MCLeaksAPI.Builder |
okHttpClient(okhttp3.OkHttpClient okHttpClient)
Used to implement your own built client
|
MCLeaksAPI.Builder |
testing()
Marks requests coming from the service for testing
|
MCLeaksAPI.Builder |
threadCount(int threadCount)
The amount of threads to use for concurrent requests
|
MCLeaksAPI.Builder |
userAgent(String userAgent)
Changes the user agent used in requests
|
public MCLeaksAPI.Builder threadCount(int threadCount)
threadCount
- The number of threadspublic MCLeaksAPI.Builder expireAfter(long expireAfter, TimeUnit unit)
nocache()
is usedexpireAfter
- The amount of time to cacheunit
- The unit of timepublic MCLeaksAPI.Builder testing()
public MCLeaksAPI.Builder userAgent(String userAgent)
userAgent
- The new user agent to usepublic MCLeaksAPI.Builder apiKey(String apiKey)
apiKey
- The API key to usepublic MCLeaksAPI.Builder nocache()
public MCLeaksAPI.Builder okHttpClient(okhttp3.OkHttpClient okHttpClient)
okHttpClient
- The client used for api callspublic MCLeaksAPI build()
Copyright © 2017. All rights reserved.