using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace SpotifyAPI.Web { public interface IClient : IDisposable { JsonSerializerSettings JsonSettings { get; set; } /// /// Downloads data from an URL and returns it /// /// An URL /// string Download(string url); /// /// Downloads data async from an URL and returns it /// /// /// Task DownloadAsync(string url); /// /// Downloads data from an URL and returns it /// /// An URL /// byte[] DownloadRaw(string url); /// /// Downloads data async from an URL and returns it /// /// /// Task DownloadRawAsync(string url); /// /// Downloads data from an URL and converts it to an object /// /// The Type which the object gets converted to /// An URL /// T DownloadJson(string url); /// /// Downloads data async from an URL and converts it to an object /// /// The Type which the object gets converted to /// An URL /// Task DownloadJsonAsync(string url); /// /// Uploads data from an URL and returns the response /// /// An URL /// The Body-Data (most likely a JSON String) /// The Upload-method (POST,DELETE,PUT) /// string Upload(string url, string body, string method); /// /// Uploads data async from an URL and returns the response /// /// An URL /// The Body-Data (most likely a JSON String) /// The Upload-method (POST,DELETE,PUT) /// Task UploadAsync(string url, string body, string method); /// /// Uploads data from an URL and returns the response /// /// An URL /// The Body-Data (most likely a JSON String) /// The Upload-method (POST,DELETE,PUT) /// byte[] UploadRaw(string url, string body, string method); /// /// Uploads data async from an URL and returns the response /// /// An URL /// The Body-Data (most likely a JSON String) /// The Upload-method (POST,DELETE,PUT) /// Task UploadRawAsync(string url, string body, string method); /// /// Uploads data from an URL and converts the response to an object /// /// The Type which the object gets converted to /// An URL /// The Body-Data (most likely a JSON String) /// The Upload-method (POST,DELETE,PUT) /// T UploadJson(string url, string body, string method); /// /// Uploads data async from an URL and converts the response to an object /// /// The Type which the object gets converted to /// An URL /// The Body-Data (most likely a JSON String) /// The Upload-method (POST,DELETE,PUT) /// Task UploadJsonAsync(string url, string body, string method); /// /// Sets a specific Header /// /// Header name /// Header value void SetHeader(string header, string value); /// /// Removes a specific Header /// /// Header name void RemoveHeader(string header); /// /// Gets all current Headers /// /// A collection of Header KeyValue Pairs List> GetHeaders(); } }