예제 #1
0
        public ChallongeClient(string key)
        {
            apiKey = key ?? throw new ArgumentNullException("key");

            Tournaments  = new TournamentHandler(apiKey, httpClient);
            Participants = new ParticipantsHandler(apiKey, httpClient);
            Matches      = new MatchesHandler(apiKey, httpClient);
            Attachments  = new AttachmentsHandler(apiKey, httpClient);
        }
예제 #2
0
        public ChallongeClient(string key, HttpClient httpClient)
        {
            string apiKey = key ?? throw new ArgumentNullException(nameof(key));

            if (httpClient == null)
            {
                throw new ArgumentNullException(nameof(httpClient));
            }

            Tournaments  = new TournamentHandler(apiKey, httpClient);
            Participants = new ParticipantsHandler(apiKey, httpClient);
            Matches      = new MatchesHandler(apiKey, httpClient);
            Attachments  = new AttachmentsHandler(apiKey, httpClient);
        }