﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BungieSharp.API.Net {
    /// <summary>
    /// Representation of the REST response from the API.
    /// </summary>
    public class RestResponse<T> {
        /// <summary>
        /// The response's data.
        /// </summary>
        public T Response { get; set; }
        /// <summary>
        /// The error code returned by the API. This should be 1.
        /// </summary>
        public int ErrorCode { get; set; }
        /// <summary>
        /// Seconds to throttle in case you make too many requests.
        /// </summary>
        public float ThrottleSeconds { get; set; }
        /// <summary>
        /// The error status of the response. Should be "Success".
        /// </summary>
        public string ErrorStatus { get; set; }
        /// <summary>
        /// The message contained in the response. Most often <code>"Ok"</code>.
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// Eventual data returned with the response. Most often <code>null</code>.
        /// </summary>
        public dynamic MessageData { get; set; }
    }
}
