Beispiel #1
0
        /// <summary>
        /// Get the recommended games
        /// </summary>
        /// <param name="domainID">domain ID</param>
        /// <param name="isMobile">is mobile</param>
        /// <param name="userID">user ID</param>
        /// <param name="countryID">country ID</param>
        /// <param name="gender">Female / Male</param>
        /// <param name="age">age</param>
        /// <param name="maxNumber">The maximum records of the recommended games</param>
        /// <returns></returns>
        public static bool TryGet(long domainID,
                                  bool isMobile,
                                  VendorID vendor,
                                  string gameCode,
                                  out List <RecommendedGame> games)
        {
            string url = GetGameRecommendedUrl(domainID, isMobile, vendor, gameCode);

            bool success = RecommendedGame.TryGet(url, out games);

            if (success)
            {
                games = games.Skip(1).ToList();
            }
            return(success);
//            string request = BuildRequest(domainID, isMobile, vendor, gameCode, maxRecords);

//            #region fake JSON
//            string json = @"{
//   ""code"":201,
//   ""message"":""success"",
//   ""results"":{
//      ""GameType"":""Desktop"",
//      ""Recolist"":[
//         [
//            ""NetEnt"",
//            ""lrtxsholdem_sw"",
//            0.5
//         ],
//         [
//            ""EGT"",
//            ""804"",
//            0.3
//         ],
//         [
//            ""PlaynGO"",
//            ""34"",
//            0.1
//         ]
//      ]
//   }
//}";
//            #endregion

//            return RecommendedGame.Parse(json);
        }
Beispiel #2
0
        /// <summary>
        /// Get the recommended games
        /// </summary>
        /// <param name="domainID">domain ID</param>
        /// <param name="isMobile">is mobile</param>
        /// <param name="userID">user ID</param>
        /// <param name="countryID">country ID</param>
        /// <param name="gender">Female / Male</param>
        /// <param name="age">age</param>
        /// <param name="maxNumber">The maximum records of the recommended games</param>
        /// <returns></returns>
        public static bool TryGet(long domainID,
                                  bool isMobile,
                                  long userID,
                                  int countryID,
                                  string gender,
                                  DateTime?birthday,
                                  out List <RecommendedGame> games)
        {
            //string request = BuildRequest(domainID, isMobile, userID, countryID, gender, birthday, maxRecords);
            string url = GetUserRecommendedUrl(domainID, isMobile, userID, countryID, gender, birthday);

            return(RecommendedGame.TryGet(url, out games));

//            #region fake JSON
//            string json = @"{
//   ""code"":201,
//   ""message"":""success"",
//   ""results"":{
//      ""GameType"":""Desktop"",
//      ""Recolist"":[
//         [
//            ""NetEnt"",
//            ""lrtxsholdem_sw"",
//            0.5
//         ],
//         [
//            ""EGT"",
//            ""804"",
//            0.3
//         ],
//         [
//            ""PlaynGO"",
//            ""34"",
//            0.1
//         ]
//      ]
//   }
//}";
//            #endregion

//            return RecommendedGame.Parse(json);
        }