mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-19 20:33:03 +00:00
Shared exchange functionality (#214)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.Text;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for paginated endpoints
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class PaginatedEndpointOptions<T> : EndpointOptions<T> where T : SharedRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Type of pagination supported
|
||||
/// </summary>
|
||||
public SharedPaginationSupport PaginationSupport { get; }
|
||||
|
||||
/// <summary>
|
||||
/// ctor
|
||||
/// </summary>
|
||||
public PaginatedEndpointOptions(SharedPaginationSupport paginationType, bool needsAuthentication) : base(needsAuthentication)
|
||||
{
|
||||
PaginationSupport = paginationType;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString(string exchange)
|
||||
{
|
||||
var sb = new StringBuilder(base.ToString(exchange));
|
||||
sb.AppendLine($"Pagination type: {PaginationSupport}");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user