Class ChallengesAPI
- java.lang.Object
-
- com.cheetahdigital.corekit.models.module.Controller
-
- com.cheetahdigital.challenges.core.api.ChallengesAPI
-
- All Implemented Interfaces:
com.cheetahdigital.corekit.rest.RestController
public class ChallengesAPI extends com.cheetahdigital.corekit.models.module.ControllerClass for setting the query parameters of Challenges API. AllNullableparameters means you can remove the parameter by passing anullvalue.
-
-
Constructor Summary
Constructors Constructor Description ChallengesAPI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetChallenge(ChallengeHeaders headers, ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Challenge>,Challenge> listener)Get the challengevoidgetChallenge(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Challenge>,Challenge> listener)Get the challengeprotected ChallengeHeadersgetChallengeHeaders()voidgetChallengeResponse(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<ChallengeResponse>,ChallengeResponse> listener)Get the challenge responsevoidgetChallengeResponses(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<ChallengeResponses>,ChallengeResponses> listener)Get the challenge responsesvoidgetChallenges(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Challenges>,Challenges> listener)Get list of challengesstatic ChallengesAPIgetInstance()voidpostChallenge(ChallengeParams params, ChallengeFields fields, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)Respond to a challengevoidpostChallenge(ChallengeParams params, ChallengeParts parts, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)Respond to a challengevoidpostChallenge(ChallengeParams params, okhttp3.RequestBody body, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)Respond to a challengevoidputChallenge(ChallengeParams params, ChallengeFields fields, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)Retry responding to a challengevoidputChallenge(ChallengeParams params, ChallengeParts parts, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)Retry responding to a challengevoidputChallenge(ChallengeParams params, okhttp3.RequestBody body, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)Respond to a challenge
-
-
-
Method Detail
-
getInstance
public static ChallengesAPI getInstance()
-
getChallenges
public void getChallenges(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Challenges>,Challenges> listener)
Get list of challenges- Parameters:
params-ChallengeParamsfor the Challenges APIclearCache- clear previously stored cachelistener- callback to handle the result
-
getChallenge
public void getChallenge(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Challenge>,Challenge> listener)
Get the challenge- Parameters:
params-ChallengeParamsfor the Challenges APIclearCache- clear previously stored cachelistener- callback to handle the result
-
getChallengeHeaders
protected ChallengeHeaders getChallengeHeaders()
-
getChallenge
public void getChallenge(ChallengeHeaders headers, ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Challenge>,Challenge> listener)
Get the challenge- Parameters:
headers-ChallengeHeadersfor the Challenges APIparams-ChallengeParamsfor the Challenges APIclearCache- clear previously stored cachelistener- callback to handle the result
-
getChallengeResponses
public void getChallengeResponses(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<ChallengeResponses>,ChallengeResponses> listener)
Get the challenge responses- Parameters:
params-ChallengeParamsfor the Challenges APIclearCache- clear previously stored cachelistener- callback to handle the result
-
getChallengeResponse
public void getChallengeResponse(ChallengeParams params, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<ChallengeResponse>,ChallengeResponse> listener)
Get the challenge response- Parameters:
params-ChallengeParamsfor the Challenges APIclearCache- clear previously stored cachelistener- callback to handle the result
-
postChallenge
public void postChallenge(ChallengeParams params, ChallengeFields fields, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)
Respond to a challenge- Parameters:
params-ChallengeParamsfor the Challenges APIfields-ChallengeFieldsfor the Challenges APIlistener- callback to handle the result
-
postChallenge
public void postChallenge(ChallengeParams params, ChallengeParts parts, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)
Respond to a challenge- Parameters:
params-ChallengeParamsfor the Challenges APIparts-ChallengePartsfor the Challenges APIlistener- callback to handle the result
-
postChallenge
public void postChallenge(ChallengeParams params, okhttp3.RequestBody body, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)
Respond to a challenge- Parameters:
params-ChallengeParamsfor the Challenges APIbody-RequestBodyfor the Challenges APIlistener- callback to handle the result
-
putChallenge
public void putChallenge(ChallengeParams params, ChallengeFields fields, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)
Retry responding to a challenge- Parameters:
params-ChallengeParamsfor the Challenges APIfields-ChallengeFieldsfor the Challenges APIlistener- callback to handle the result
-
putChallenge
public void putChallenge(ChallengeParams params, ChallengeParts parts, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)
Retry responding to a challenge- Parameters:
params-ChallengeParamsfor the Challenges APIparts- instance ofChallengePartsthat contains the attachmentlistener- callback to handle the result
-
putChallenge
public void putChallenge(ChallengeParams params, okhttp3.RequestBody body, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Response>,Response> listener)
Respond to a challenge- Parameters:
params-ChallengeParamsfor the Challenges APIbody-RequestBodyfor the Challenges APIlistener- callback to handle the result
-
-