示例#1
0
 /// <summary>
 /// Get log of recent battles for a player
 /// </summary>
 /// <remarks>
 /// Get list of recent battle results for a player.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='playerTag'>
 /// Tag of the player whose information to retrieve.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <BattleLogItem> > GetPlayerBattlesAsync(this ICRClient operations, string playerTag, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetPlayerBattlesWithHttpMessagesAsync(playerTag, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Get location information
 /// </summary>
 /// <remarks>
 /// Get information about specific location
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationId'>
 /// Identifier of the location to retrieve.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Location> GetLocationAsync(this ICRClient operations, string locationId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetLocationWithHttpMessagesAsync(locationId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Get tournament information
 /// </summary>
 /// <remarks>
 /// Get information about a single tournament by a tournament tag.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tournamentTag'>
 /// Tag of the tournament to retrieve.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Tournament> GetTournamentAsync(this ICRClient operations, string tournamentTag, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetTournamentWithHttpMessagesAsync(tournamentTag, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// Search tournaments
 /// </summary>
 /// <remarks>
 /// Search all tournaments by name.
 ///
 /// It is not possible to specify ordering for results so clients should not
 /// rely on any specific ordering
 /// as that may change in the future releases of the API.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Search tournaments by name.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TournamentSearchResult> SearchTournamentsAsync(this ICRClient operations, string name = default(string), int?limit = default(int?), int?after = default(int?), int?before = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SearchTournamentsWithHttpMessagesAsync(name, limit, after, before, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
 /// <summary>
 /// Retrieve information about clan's current clan war
 /// </summary>
 /// <remarks>
 /// Retrieve information about clan's current clan war
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clanTag'>
 /// Tag of the clan whose war log to retrieve.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CurrentWar> GetCurrentWarAsync(this ICRClient operations, string clanTag, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetCurrentWarWithHttpMessagesAsync(clanTag, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// Get list of available cards
 /// </summary>
 /// <remarks>
 /// Get list of all available cards.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CardList> GetCardsAsync(this ICRClient operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetCardsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#7
0
 /// <summary>
 /// Retrieve clan's clan war log
 /// </summary>
 /// <remarks>
 /// Retrieve clan's clan war log
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clanTag'>
 /// Tag of the clan whose war log to retrieve.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WarLog> GetClanWarLogAsync(this ICRClient operations, string clanTag, int?limit = default(int?), int?after = default(int?), int?before = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetClanWarLogWithHttpMessagesAsync(clanTag, limit, after, before, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#8
0
 /// <summary>
 /// Get player rankings for a specific location
 /// </summary>
 /// <remarks>
 /// Get player rankings for a specific location
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationId'>
 /// Identifier of the location to retrieve.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PlayerRankingList> GetPlayerRankingAsync(this ICRClient operations, string locationId, int?limit = default(int?), int?after = default(int?), int?before = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetPlayerRankingWithHttpMessagesAsync(locationId, limit, after, before, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#9
0
 /// <summary>
 /// Search clans
 /// </summary>
 /// <remarks>
 /// Search all clans by name and/or filtering the results using various
 /// criteria. At least one filtering
 /// criteria must be defined and if name is used as part of search, it is
 /// required to be at least three
 /// characters long.
 ///
 /// It is not possible to specify ordering for results so clients should not
 /// rely on any specific ordering
 /// as that may change in the future releases of the API.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Search clans by name. If name is used as part of search query, it needs to
 /// be at least three
 /// characters long. Name search parameter is interpreted as wild card search,
 /// so it may appear
 /// anywhere in the clan name.
 /// </param>
 /// <param name='locationId'>
 /// Filter by clan location identifier. For list of available locations, refer
 /// to getLocations operation.
 /// </param>
 /// <param name='minMembers'>
 /// Filter by minimum amount of clan members.
 /// </param>
 /// <param name='maxMembers'>
 /// Filter by maximum amount of clan members.
 /// </param>
 /// <param name='minScore'>
 /// Filter by minimum amount of clan score.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ClanSearchResult> SearchClansAsync(this ICRClient operations, string name = default(string), int?locationId = default(int?), int?minMembers = default(int?), int?maxMembers = default(int?), int?minScore = default(int?), int?limit = default(int?), int?after = default(int?), int?before = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SearchClansWithHttpMessagesAsync(name, locationId, minMembers, maxMembers, minScore, limit, after, before, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public Client(IClientCommandHandler clientCommandHandler,
               IClientResponseHandler clientResponseHandler,
               IScheduleCommandManager scheduleCommandManager,
               IUserInterface userInferface)
 {
     _clientCommandHandler  = clientCommandHandler;
     _clientResponseHandler = clientResponseHandler;
     _clientResponseHandler.SetClientMediator(this);
     _scheduleCommandManager = scheduleCommandManager;
     _scheduleCommandManager.SetClientMediator(this);
     _userInterface = userInferface;
     _userInterface.SetClientMediator(this);
     _crClient = new CRClient(this);
 }
示例#11
0
 /// <summary>
 /// Get location information
 /// </summary>
 /// <remarks>
 /// Get information about specific location
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationId'>
 /// Identifier of the location to retrieve.
 /// </param>
 public static Location GetLocation(this ICRClient operations, string locationId)
 {
     return(operations.GetLocationAsync(locationId).GetAwaiter().GetResult());
 }
示例#12
0
 /// <summary>
 /// Get clan information
 /// </summary>
 /// <remarks>
 /// Get information about a single clan by clan tag. Clan tags can be found
 /// using clan search operation.
 ///
 /// Note that clan tags start with hash character '#' and that needs to be
 /// URL-encoded properly to work
 /// in URL, so for example clan tag '#2ABC' would become '%232ABC' in the URL.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clanTag'>
 /// Tag of the clan to retrieve.
 /// </param>
 public static Clan GetClan(this ICRClient operations, string clanTag)
 {
     return(operations.GetClanAsync(clanTag).GetAwaiter().GetResult());
 }
示例#13
0
 /// <summary>
 /// List locations
 /// </summary>
 /// <remarks>
 /// List all available locations
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 public static LocationList GetLocations(this ICRClient operations, int?limit = default(int?), int?after = default(int?), int?before = default(int?))
 {
     return(operations.GetLocationsAsync(limit, after, before).GetAwaiter().GetResult());
 }
示例#14
0
 /// <summary>
 /// Search clans
 /// </summary>
 /// <remarks>
 /// Search all clans by name and/or filtering the results using various
 /// criteria. At least one filtering
 /// criteria must be defined and if name is used as part of search, it is
 /// required to be at least three
 /// characters long.
 ///
 /// It is not possible to specify ordering for results so clients should not
 /// rely on any specific ordering
 /// as that may change in the future releases of the API.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Search clans by name. If name is used as part of search query, it needs to
 /// be at least three
 /// characters long. Name search parameter is interpreted as wild card search,
 /// so it may appear
 /// anywhere in the clan name.
 /// </param>
 /// <param name='locationId'>
 /// Filter by clan location identifier. For list of available locations, refer
 /// to getLocations operation.
 /// </param>
 /// <param name='minMembers'>
 /// Filter by minimum amount of clan members.
 /// </param>
 /// <param name='maxMembers'>
 /// Filter by maximum amount of clan members.
 /// </param>
 /// <param name='minScore'>
 /// Filter by minimum amount of clan score.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 public static ClanSearchResult SearchClans(this ICRClient operations, string name = default(string), int?locationId = default(int?), int?minMembers = default(int?), int?maxMembers = default(int?), int?minScore = default(int?), int?limit = default(int?), int?after = default(int?), int?before = default(int?))
 {
     return(operations.SearchClansAsync(name, locationId, minMembers, maxMembers, minScore, limit, after, before).GetAwaiter().GetResult());
 }
示例#15
0
 /// <summary>
 /// Get list of available cards
 /// </summary>
 /// <remarks>
 /// Get list of all available cards.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static CardList GetCards(this ICRClient operations)
 {
     return(operations.GetCardsAsync().GetAwaiter().GetResult());
 }
示例#16
0
 /// <summary>
 /// Retrieve information about clan's current clan war
 /// </summary>
 /// <remarks>
 /// Retrieve information about clan's current clan war
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clanTag'>
 /// Tag of the clan whose war log to retrieve.
 /// </param>
 public static CurrentWar GetCurrentWar(this ICRClient operations, string clanTag)
 {
     return(operations.GetCurrentWarAsync(clanTag).GetAwaiter().GetResult());
 }
示例#17
0
 /// <summary>
 /// Get player information
 /// </summary>
 /// <remarks>
 /// Get information about a single player by player tag. Player tags can be
 /// found either in game or by from
 /// clan member lists.
 ///
 /// Note that player tags start with hash character '#' and that needs to be
 /// URL-encoded properly to work
 /// in URL, so for example player tag '#2ABC' would become '%232ABC' in the
 /// URL.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='playerTag'>
 /// Tag of the player to retrieve.
 /// </param>
 public static PlayerDetail GetPlayer(this ICRClient operations, string playerTag)
 {
     return(operations.GetPlayerAsync(playerTag).GetAwaiter().GetResult());
 }
示例#18
0
 /// <summary>
 /// Get tournament information
 /// </summary>
 /// <remarks>
 /// Get information about a single tournament by a tournament tag.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tournamentTag'>
 /// Tag of the tournament to retrieve.
 /// </param>
 public static Tournament GetTournament(this ICRClient operations, string tournamentTag)
 {
     return(operations.GetTournamentAsync(tournamentTag).GetAwaiter().GetResult());
 }
示例#19
0
 /// <summary>
 /// Get information about player's upcoming chests
 /// </summary>
 /// <remarks>
 /// Get list of reward chests that the player will receive next in the game.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='playerTag'>
 /// Tag of the player whose information to retrieve.
 /// </param>
 public static UpcomingChestsList GetPlayerUpcomingChests(this ICRClient operations, string playerTag)
 {
     return(operations.GetPlayerUpcomingChestsAsync(playerTag).GetAwaiter().GetResult());
 }
示例#20
0
 /// <summary>
 /// Retrieve clan's clan war log
 /// </summary>
 /// <remarks>
 /// Retrieve clan's clan war log
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clanTag'>
 /// Tag of the clan whose war log to retrieve.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 public static WarLog GetClanWarLog(this ICRClient operations, string clanTag, int?limit = default(int?), int?after = default(int?), int?before = default(int?))
 {
     return(operations.GetClanWarLogAsync(clanTag, limit, after, before).GetAwaiter().GetResult());
 }
示例#21
0
 /// <summary>
 /// Get log of recent battles for a player
 /// </summary>
 /// <remarks>
 /// Get list of recent battle results for a player.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='playerTag'>
 /// Tag of the player whose information to retrieve.
 /// </param>
 public static IList <BattleLogItem> GetPlayerBattles(this ICRClient operations, string playerTag)
 {
     return(operations.GetPlayerBattlesAsync(playerTag).GetAwaiter().GetResult());
 }
示例#22
0
 /// <summary>
 /// Get clan war rankings for a specific location
 /// </summary>
 /// <remarks>
 /// Get clan war rankings for a specific location
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationId'>
 /// Identifier of the location to retrieve.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 public static ClanWarsRankingList GetClanWarsRanking(this ICRClient operations, string locationId, int?limit = default(int?), int?after = default(int?), int?before = default(int?))
 {
     return(operations.GetClanWarsRankingAsync(locationId, limit, after, before).GetAwaiter().GetResult());
 }
示例#23
0
 /// <summary>
 /// Search tournaments
 /// </summary>
 /// <remarks>
 /// Search all tournaments by name.
 ///
 /// It is not possible to specify ordering for results so clients should not
 /// rely on any specific ordering
 /// as that may change in the future releases of the API.
 ///
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Search tournaments by name.
 /// </param>
 /// <param name='limit'>
 /// Limit the number of items returned in the response.
 /// </param>
 /// <param name='after'>
 /// Return only items that occur after this marker. After marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 /// <param name='before'>
 /// Return only items that occur before this marker. Before marker can be found
 /// from the
 /// response, inside the 'paging' property. Note that only after or before can
 /// be specified for a
 /// request, not both.
 /// </param>
 public static TournamentSearchResult SearchTournaments(this ICRClient operations, string name = default(string), int?limit = default(int?), int?after = default(int?), int?before = default(int?))
 {
     return(operations.SearchTournamentsAsync(name, limit, after, before).GetAwaiter().GetResult());
 }