mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-25 15:36:26 +00:00
23 lines
522 B
C#
23 lines
522 B
C#
using System.Net;
|
|
using Newtonsoft.Json;
|
|
|
|
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;
|
|
}
|
|
} |