Exemple #1
0
 private void AddRecentOutputFormat(GameOutputFormat format)
 {
     if (format != DEFAULT_RECENT_OUTPUT_FORMAT)
     {
         AddSearchTermArgument("format", format.ToString().ToLower());
     }
 }
Exemple #2
0
 private void BuildRandomGamesSearch(GameOutputFormat format, int limit = DEFAULT_LIMIT)
 {
     AddSearchTerm("/games/random");
     if (limit != DEFAULT_LIMIT)
     {
         AddSearchTermArgument("limit", limit.ToString());
     }
     AddGamesOutputFormat(format);
 }
Exemple #3
0
 private void BuildGamesSearch(List <int> ids, GameOutputFormat format)
 {
     AddSearchTerm("/games");
     foreach (var id in ids)
     {
         AddSearchTermArgument("id", id.ToString());
     }
     AddGamesOutputFormat(format);
 }
Exemple #4
0
 private void BuildRecentGamesSearch(GameOutputFormat format, int age = DEFAULT_RECENT_AGE, int limit = DEFAULT_LIMIT, int offset = DEFAULT_OFFSET)
 {
     AddSearchTerm("/games/recent");
     if (age != DEFAULT_RECENT_AGE)
     {
         AddSearchTermArgument("age", age.ToString());
     }
     AddLimitOffset(limit, offset);
     AddGamesOutputFormat(format);
 }
Exemple #5
0
        private void BuildGamesSearch(List <int> platforms, List <int> genres, List <int> groups, GameOutputFormat format, string title = "", int limit = DEFAULT_LIMIT, int offset = DEFAULT_OFFSET)
        {
            AddSearchTerm("/games");
            foreach (var platform in platforms)
            {
                AddSearchTermArgument("platform", platform.ToString());
            }
            foreach (var genre in genres)
            {
                AddSearchTermArgument("genre", genre.ToString());
            }
            foreach (var group in groups)
            {
                AddSearchTermArgument("group", group.ToString());
            }
            if (title != string.Empty)
            {
                AddSearchTermArgument("title", title);
            }

            AddLimitOffset(limit, offset);
            AddGamesOutputFormat(format);
        }
Exemple #6
0
 private void BuildGamesSearch(int id, GameOutputFormat format)
 {
     AddSearchTerm("/games/" + id.ToString());
     AddGamesOutputFormat(format);
 }