Пример #1
0
        /// <summary>
        /// See docs in <see cref="SoomlaProfile.GetLeaderboards"/>
        /// </summary>
        public void GetLeaderboards(SocialPageDataSuccess <Leaderboard> success, FailureHandler fail)
        {
            var leaderboardJson = new JSONObject();

            leaderboardJson.AddField(PJSONConsts.UP_IDENTIFIER, "main");
            leaderboardJson.AddField(PJSONConsts.UP_PROVIDER, Provider.FACEBOOK.ToString());
            var leaderboard = new Leaderboard(leaderboardJson);

            var pageData = new SocialPageData <Leaderboard>();

            pageData.HasMore    = false;
            pageData.PageNumber = 1;
            pageData.PageData   = new List <Leaderboard>()
            {
                leaderboard
            };
            success(pageData);
        }
Пример #2
0
        /// <summary>
        /// See docs in <see cref="SoomlaProfile.GetScores"/>
        /// </summary>
        public void GetScores(Leaderboard owner, bool fromStart, SocialPageDataSuccess <Score> success, FailureHandler fail)
        {
            FB.API("/app/scores?fields=score,user",
                   HttpMethod.GET,
                   (IGraphResult result) => {
                if (result.Error != null)
                {
                    SoomlaUtils.LogDebug(TAG, "GetScoreCallback[result.Error]: " + result.Error);
                    fail(result.Error);
                }
                else
                {
                    SoomlaUtils.LogDebug(TAG, "GetScoreCallback[result.Text]: " + result.RawResult);
                    JSONObject jsonFeed = new JSONObject(result.RawResult);

                    SocialPageData <Score> resultData = new SocialPageData <Score>();
                    resultData.PageData   = ScoreFromFBJsonObjs(owner, jsonFeed["data"].list);
                    resultData.PageNumber = 1;
                    resultData.HasMore    = false;

                    success(resultData);
                }
            });
        }
 public override void GetScores(Leaderboard owner, bool fromStart, SocialPageDataSuccess<Score> success, FailureHandler fail)
 {
 }
 public override void GetLeaderboards(SocialPageDataSuccess<Leaderboard> success, FailureHandler fail)
 {
 }
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetContacts"/>
 /// </summary>
 public override void GetContacts(bool fromStart, SocialPageDataSuccess<UserProfile> success, FailureHandler fail)
 {
 }
Пример #6
0
 public void GetScores(Leaderboard owner, bool fromStart, SocialPageDataSuccess <Score> success, FailureHandler fail)
 {
 }
Пример #7
0
 public void GetLeaderboards(SocialPageDataSuccess <Leaderboard> success, FailureHandler fail)
 {
 }
Пример #8
0
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.GetContacts"/>
 /// </summary>
 public override void GetContacts(bool fromStart, SocialPageDataSuccess <UserProfile> success, FailureHandler fail)
 {
 }