Rate Limit handling #11
marcogruhl
started this conversation in
Ideas
Replies: 2 comments 10 replies
-
|
I like the idea of extending the Response object but maybe headers shouldn't be parsed by default on every request? What do you think of having a BaseObject class like that: public class BaseObject
{
internal BaseObject(HttpResponseHeaders headers)
=> _headers = headers;
public XRate GetRateLimits()
{
// Implement header parsing as shown above
}
private HttpResponseHeaders _headers;
}And every result object would inherit it so GetRateLimits() would be accessible from every response? |
Beta Was this translation helpful? Give feedback.
10 replies
-
|
Created the pull request #14 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
this wrapper is the best i found for my twitter project. I played around and hit constantly rate limits. Sadly, this information is not provided.
I look at the code and have two ideas to implement this based on Twitter API Documentation
the twitter has to use
GetAsyncinstead ofGetStringAsync1. Extend the Response objects
public class StreamInfo : XRate, IEquatable<StreamInfo>the XRate Object would look like:
and than use the
ParseArrayDataMethod like this:! VERY UNOPTIMIZED !
2. Provide via EventHandler
TweetClient.cs:
XRate Class:
I will implement this if its fitting to your idea of this project
Beta Was this translation helpful? Give feedback.
All reactions