mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
RateLimit class encapsulates rate limit headers
Added a RateLimit class to encapsulate pulling rate limit information from the headers. This is now exposed by ApiInfo as well as the RateLimitExceeededException. That way these two classes are not grabbing the same information in different ways which we were doing before.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Octokit.Tests.Models
|
||||
var response = new ApiResponse<List<object>>
|
||||
{
|
||||
BodyAsObject = new List<object>(),
|
||||
ApiInfo = new ApiInfo(links, scopes, scopes, "etag", 100, 100)
|
||||
ApiInfo = new ApiInfo(links, scopes, scopes, "etag", new RateLimit(new Dictionary<string, string>()))
|
||||
};
|
||||
var connection = Substitute.For<IConnection>();
|
||||
connection.GetAsync<List<object>>(nextPageUrl, null, null).Returns(nextPageResponse);
|
||||
|
||||
Reference in New Issue
Block a user