public async Task <UserProfile> GetUserProfileByAccessToken(string token, string baseUrl = null, string api = null) { if (string.IsNullOrEmpty(baseUrl)) { baseUrl = AppSettingsProvider.IdentityBaseUrl; } if (string.IsNullOrEmpty(api)) { api = AppSettingsProvider.GetUserProfile; } var userId = await _httpHandler.AuthGetAsync <UserProfile>(token, baseUrl, api); return(userId); }
public async Task <LoyaltyModel> GetLoyalty(string accessToken, string userId) { var loyaltyBaseUrl = AppSettingsProvider.LoyaltyBaseUrl; var getLoyaltyApi = AppSettingsProvider.LoyaltyUserStats.Replace("{userId}", userId); var loyalty = await _httpHandler.AuthGetAsync <LoyaltyModel>(accessToken, loyaltyBaseUrl, getLoyaltyApi); return(loyalty); }