using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Threading.Tasks; using SpotifyAPI.Web.Models; namespace SpotifyAPI.Web { public interface IClient : IDisposable { JsonSerializerSettings JsonSettings { get; set; } /// /// Downloads data from an URL and returns it /// /// An URL /// Tuple 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 /// Tuple 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 /// Tuple 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) /// Tuple 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) /// Tuple 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) /// Tuple 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(); } }