Beispiel #1
0
        public async Task ChargeCredit(CreditsModel model, string accessToken)
        {
            var baseUrl = AppSettingsProvider.LoyaltyBaseUrl;
            var api     = AppSettingsProvider.ChargeCredits;

            var messageBody = JsonConvert.SerializeObject(model);
            await _httpHandler.AuthPutAsync(accessToken, baseUrl, api, messageBody);
        }
Beispiel #2
0
        private async Task <CreditsModel> ActorImageExistValidator(CreditsModel credits, string Url = "http://image.tmdb.org/t/p/w185")
        {
            List <Task <CreditsModel.Cast> > tasks = new List <Task <CreditsModel.Cast> >();

            foreach (var cast in credits.cast)
            {
                tasks.Add(Download(cast, Url));
            }
            credits.cast = await Task.WhenAll(tasks);

            return(credits);
        }