Class LeaderboardAPI

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

    public class LeaderboardAPI
    extends com.cheetahdigital.corekit.models.module.Controller
    Class for setting the query parameters of Leaderboard API.
    • Field Summary

      • Fields inherited from class com.cheetahdigital.corekit.models.module.Controller

        STANDARD_DATE_FORMAT, TIMEZONE_DATE_FORMAT
    • Constructor Summary

      Constructors 
      Constructor Description
      LeaderboardAPI()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void getLeaderboardAroundMe​(LeaderboardParams leaderboardParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<LeaderData>,​LeaderData> listener)
      Gets the list of members around the user's rank and removes responses from cache
      void getLeaderboardFriendsRank​(LeaderboardParams leaderboardParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<LeaderData>,​LeaderData> listener)
      Get the ranking of friends and remvoes responses from cache
      void getLeaderboardMemberRank​(LeaderboardParams leaderboardParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<MemberRankData>,​MemberRankData> listener)
      Gets the ranking of member and removes responses from cache
      void getLeaderboards​(LeaderboardParams leaderboardParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<BoardData>,​BoardData> listener)
      Get the list of leaderboards
      void getTopNLeaderboard​(LeaderboardParams leaderboardParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<LeaderData>,​LeaderData> listener)
      Gets the list of top ranking members
      • Methods inherited from class com.cheetahdigital.corekit.models.module.Controller

        createCache, createHttpClient, createRetrofitInterface, evictAllCache, getGsonConfiguration, getRestAdapter, getTimeoutConnectionInSeconds, getTimeoutSocketInSeconds, initialize, removeResponsesFromCache
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LeaderboardAPI

        public LeaderboardAPI()
    • Method Detail

      • getLeaderboards

        public void getLeaderboards​(LeaderboardParams leaderboardParams,
                                    boolean clearCache,
                                    com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<BoardData>,​BoardData> listener)
        Get the list of leaderboards
        Parameters:
        leaderboardParams - the LeaderboardParams for Leaderboard API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results
      • getTopNLeaderboard

        public void getTopNLeaderboard​(LeaderboardParams leaderboardParams,
                                       boolean clearCache,
                                       com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<LeaderData>,​LeaderData> listener)
        Gets the list of top ranking members
        Parameters:
        leaderboardParams - the LeaderboardParams for Leaderboard API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results
      • getLeaderboardAroundMe

        public void getLeaderboardAroundMe​(LeaderboardParams leaderboardParams,
                                           boolean clearCache,
                                           com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<LeaderData>,​LeaderData> listener)
        Gets the list of members around the user's rank and removes responses from cache
        Parameters:
        leaderboardParams - the LeaderboardParams for Leaderboard API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results
      • getLeaderboardMemberRank

        public void getLeaderboardMemberRank​(LeaderboardParams leaderboardParams,
                                             boolean clearCache,
                                             com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<MemberRankData>,​MemberRankData> listener)
        Gets the ranking of member and removes responses from cache
        Parameters:
        leaderboardParams - the LeaderboardParams for Leaderboard API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results
      • getLeaderboardFriendsRank

        public void getLeaderboardFriendsRank​(LeaderboardParams leaderboardParams,
                                              boolean clearCache,
                                              com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<LeaderData>,​LeaderData> listener)
        Get the ranking of friends and remvoes responses from cache
        Parameters:
        leaderboardParams - the LeaderboardParams for Leaderboard API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results