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