Пример #1
0
        private string GetFullApiUrl(ExternalApiPathName externalApiPathName)
        {
            var apiUrl     = _externalApiPathProvider.GetApiPath(externalApiPathName);
            var token      = _configProvider.GetConfigValue(ConfigKeys.Token);
            var fullApiUrl = $"{apiUrl}?token={token}";

            return(fullApiUrl);
        }
Пример #2
0
        /// <summary>
        /// Get default user
        /// </summary>
        /// <remarks>
        /// This method doesn't have to be async but it's made async to be able to retreive it from other resources such as DB or APIs
        /// </remarks>
        /// <returns></returns>
        public async Task <User> GetUser()
        {
            var token = _configProvider.GetConfigValue(ConfigKeys.Token);

            return(new User()
            {
                Name = "Arvin Kardon", Token = token
            });
        }
Пример #3
0
 public ExternalApiPathProvider(IConfigProvider configProvider)
 {
     _baseUrl = configProvider.GetConfigValue(ConfigKeys.BaseUrl);
 }