-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added GetRateLimits to MiscellaneousClient #848
Conversation
Further thoughts on point 1; |
namespace Octokit | ||
{ | ||
[DebuggerDisplay("{DebuggerDisplay,nq}")] | ||
public class MiscRateLimits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to avoid abbreviations. So I'd call this MiscellaneousRateLimit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed as suggested
Yeah, I don't think we're likely to change Thanks for the contribution! |
@haacked AppVeyor isn't building, is this because the original ResourceRateLimit.cs comment is still open, or is it something wrong with the code? Originally I though it was the code - that I needed to put some #if !NETFX_CORE blocks round attributes. But I've made changes to that an it doesn't seem to make any change. |
@Red-Folder it looks like there's a merge conflict with this branch - AppVeyor should go green after that's been addressed. |
@@ -396,7 +396,12 @@ | |||
<Compile Include="Exceptions\TwoFactorAuthorizationException.cs" /> | |||
<Compile Include="Http\HttpMessageHandlerFactory.cs" /> | |||
<Compile Include="Models\Response\TeamMembership.cs" /> | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these files need to be unified...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking into it now
Ok, green now. Now I leave it alone and get some sleep. Lessons learnt this evening:
On a more serious note;
|
@Red-Folder given this is a new feature (and the test is written) I'm happy to take it in as-is. Don't stress too much about running the integration tests, it's certainly the toughest part of contributing (and something I need to revisit). |
var result = await client.GetRateLimits(); | ||
|
||
// Test the high level object | ||
Assert.NotNull(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I love the explicitness here, I think letting this fall through to the Assert.Equals is totally fine to simplify the tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, is this the NotNull check? What about the other NotNull tests further down - lose them as well to make more readable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed the above was yes & yes
|
||
namespace Octokit | ||
{ | ||
#if !NETFX_CORE | ||
[Serializable] | ||
[DebuggerDisplay("{DebuggerDisplay,nq}")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can live outside the #if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. I changed all this when I thought it was causing the appveyor problems (there was reasoning behind my thinking but I won't bore you)
Added GetRateLimits to MiscellaneousClient
Is it wrong that after 20+ years in IT, I'm seeing a 6 second vine from Phil Hacck as my most glowing accreditation? Surely there must be a "thumbs up" accreditation section somewhere in Linkedin .... off to go look |
LOL! It's a GitHub special accreditation. Much better than LinkedIn. |
Added support for the rate_limit API (https://developer.github.com/v3/rate_limit/). Note that this is the Miscellaneous API call - not the rate details returned as part of the headers for every API call. This functionality is referenced in #811
I'm interested in feedback (thus marked as WIP). Taken a couple of design decisions that may not fit with the overall solution:
Feedback always welcomed.