示例#1
0
        public async Task ResetWin(string userId, string accessToken)
        {
            var baseUrl = AppSettingsProvider.LoyaltyBaseUrl;
            var api     = AppSettingsProvider.ResetWins.Replace("{userId}", userId);

            await _httpHandler.AuthPutAsync(accessToken, baseUrl, api);
        }
示例#2
0
        public async Task AddCredit(CreditsViewModel model, string accessToken)
        {
            var baseUrl = AppSettingsProvider.LoyaltyBaseUrl;
            var api     = AppSettingsProvider.AddCredits;

            var messageBody = JsonConvert.SerializeObject(model);
            await _httpHandler.AuthPutAsync(accessToken, baseUrl, api, messageBody);
        }
示例#3
0
文件: BotService.cs 项目: mrtcn/upope
        public async Task SendUpdateChallengeRequest(string accessToken, int challengeRequestId, UpdateChallengeInputViewModel model)
        {
            var baseUrl = AppSettingsProvider.ChallengeBaseUrl;

            var api = AppSettingsProvider.UpdateChallenge.Replace("{challengeRequestId}", challengeRequestId.ToString());

            var messageBody = JsonConvert.SerializeObject(model);
            await _httpHandler.AuthPutAsync(accessToken, baseUrl, api, messageBody);
        }