Comments (4)
@OnceUponALoop Thanks for the compliments. :-) I just wish I had more time!
As for your question: there's no special reason I don't check for response codes; I just havn't gotten to it yet. There's a few todo/comments around saying I should add exactly that, and I would like it to be a feature of all requests.
So if you're motivated, submit a patch and I'll be happy to merge it. :-)
One thing that I wonder is whether this should be added as boilerplate to every function/method, or if there's a way a callback can be (sanely) added to the session handle, so that it becomes a standard feature of all connections. I'm not if such a setup would even be useful, but is something I was considering. Going that route opens up lots of possibilities beyond error checking, such as retries, logging, filtering, etc (#14, #17, #25 could be relevant). So it's a bit of a rabbit hole. ;-)
Thanks for the question, and if you have the time and energy, it would be great to see a PR. :-D
---Alex
-edit- (added issue numbers)
from pigskin.
I thought about this topic myself.
@aqw what do you think about extending the store() class? Like adding get() and post() methods to handle HTTP requests. Exceptions and HTTP errors would be handled there as well.
from pigskin.
Hey @jm-duke,
It's been awhile since I looked at this, but I think we can avoid having to extend the store class, since it's already contains the handle to the requests session. I /think/ we can just wrap/decorate/whatever the session handle, and it'll do everything we need to.
I think that would be the preferred solution (assuming it's possible). But if you find another way that you like and think is clean, then I'm all for it. :-)
---Alex
from pigskin.
Closing this issue, as NFL has canceled the Gamepass service
from pigskin.
Related Issues (20)
- Avoid authenticating against gigya if we don't have to HOT 1
- Retire make_request() and parse_response() HOT 1
- refactor parse_shows() HOT 1
- configure self.http_session to auto-retry with a sane timeout HOT 1
- New API HOT 1
- test for check_for_subscription() fails HOT 1
- Attach logging directly to requests session handle HOT 1
- Retire pytest-vcr
- .raw() endpoint HOT 1
- Caching HOT 1
- Swap VCR cassettes according to which service is being tested HOT 1
- Find the vcrpy equivalent of "allow_playback_repeats" HOT 4
- Parse XML responses and pretty print in cassettes HOT 1
- Allow HTTP requests to be throttled HOT 1
- errors on login from kodi/nflgamepass addon HOT 1
- Convert log() to use "logging" module HOT 1
- Documentation HOT 10
- Cookie Issue? HOT 1
- get team games HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pigskin.