mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-26 07:56:26 +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;
|
|
}
|
|
} |