public static async Task <string> GetChannels(string channelId) { HttpResponseMessage response = await BasecodeRequestManager.BeginRequest(_baseURL + _channels + _id + channelId + _apiKey + API_KEY); response.EnsureSuccessStatusCode(); HttpContent content = response.Content; return(await content.ReadAsStringAsync()); }
public static async Task <string> GetVideoDetails(string videoId) { HttpResponseMessage response = await BasecodeRequestManager.BeginRequest(_baseURL + _videoDetails + _id + videoId + _apiKey + API_KEY); if (response == null) { return(String.Empty); } response.EnsureSuccessStatusCode(); HttpContent content = response.Content; return(await content.ReadAsStringAsync()); }
public static async Task <string> GetPlaylistDetails(string playlistId, int maxResults) { HttpResponseMessage response = await BasecodeRequestManager.BeginRequest(_baseURL + _playlistDetails + _playlistId + playlistId + _maxResults + maxResults + _apiKey + API_KEY); if (response == null) { return(String.Empty); } response.EnsureSuccessStatusCode(); HttpContent content = response.Content; return(await content.ReadAsStringAsync()); }