Class ChallengesAPI

  • All Implemented Interfaces:
    com.cheetahdigital.corekit.rest.RestController

    public class ChallengesAPI
    extends com.cheetahdigital.corekit.models.module.Controller
    Class for setting the query parameters of Challenges API. All Nullable parameters means you can remove the parameter by passing a null value.
    • Constructor Detail

      • ChallengesAPI

        public ChallengesAPI()
    • Method Detail

      • 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 - ChallengeParams for the Challenges API
        clearCache - clear previously stored cache
        listener - 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 - ChallengeParams for the Challenges API
        clearCache - clear previously stored cache
        listener - callback to handle the result
      • 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 - ChallengeHeaders for the Challenges API
        params - ChallengeParams for the Challenges API
        clearCache - clear previously stored cache
        listener - 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 - ChallengeParams for the Challenges API
        clearCache - clear previously stored cache
        listener - 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 - ChallengeParams for the Challenges API
        clearCache - clear previously stored cache
        listener - 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 - ChallengeParams for the Challenges API
        fields - ChallengeFields for the Challenges API
        listener - 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 - ChallengeParams for the Challenges API
        parts - ChallengeParts for the Challenges API
        listener - 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 - ChallengeParams for the Challenges API
        body - RequestBody for the Challenges API
        listener - 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 - ChallengeParams for the Challenges API
        fields - ChallengeFields for the Challenges API
        listener - 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 - ChallengeParams for the Challenges API
        parts - instance of ChallengeParts that contains the attachment
        listener - 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 - ChallengeParams for the Challenges API
        body - RequestBody for the Challenges API
        listener - callback to handle the result