using System;
using System.Collections.Generic;
using Newtonsoft.Json;
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 from an URL and returns it
///
/// An URL
///
byte[] DownloadRaw(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);
///
/// 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 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 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);
///
/// 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();
}
}