mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-27 08:26:25 +00:00
23 lines
563 B
C#
23 lines
563 B
C#
using Newtonsoft.Json;
|
|
using System.Net;
|
|
|
|
namespace SpotifyAPI.Web.Models
|
|
{
|
|
public abstract class BasicModel
|
|
{
|
|
[JsonProperty("error")]
|
|
public Error Error { get; set; }
|
|
|
|
private ResponseInfo _info;
|
|
|
|
public bool HasError() => Error != null;
|
|
|
|
internal void AddResponseInfo(ResponseInfo info) => _info = info;
|
|
|
|
public string Header(string key) => _info.Headers?.Get(key);
|
|
|
|
public WebHeaderCollection Headers() => _info.Headers;
|
|
|
|
public HttpStatusCode StatusCode() => _info.StatusCode;
|
|
}
|
|
} |