Comments (5)
@olucurious I feel like the response object returned by the method notify_single_device()
(for example) should be the actual requests library response object, and parse_responses()
should be a utility method so that we can grab the header and status code to use appropriately. I may make these changes in my own local version.
This is a great library by the way, I'm really happy someone executed on this well.
from pyfcm.
@nirajkmr the issue has been fixed here: fdedcf6
@dwarrier Thanks for the suggestion, I'll find a way to expose that very soon, I'm just concerned about breaking changes and backward compatibility for so many people who are using the library in production.
from pyfcm.
@olucurious Thank You 👍
from pyfcm.
@olucurious Thanks for adding these changes! I guess one reason to expose the headers now would be if someone wanted to limit retries, which isn't a big deal as long as they're aware of the internals.
You've probably thought about this, but it seems like Retry-After
header may contain a date instead of a time delta. I don't think it's worth handling a date response, but this may cause an unhandled exception from casting to an int: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.37. I would expect it to be a time delta most of the time, but Firebase documentation really doesn't help much here.
from pyfcm.
@dwarrier Yeah, I did spend some time thinking about that, I did some little research about the value in GCM(cos there isn't much information about FCM) and couldn't find any. I'll do more research and take care of it and also implement exponential back-off for multiple retries eventually.
from pyfcm.
Related Issues (20)
- Error: type object 'Retry' has no attribute 'DEFAULT_ALLOWED_METHODS' HOT 6
- Badge is not updated if the app is open HOT 1
- Being explicit about your versioning strategy HOT 2
- Can't import module HOT 1
- Connection pool is full, discarding connection: fcm.googleapis.com
- AttributeError: type object 'Retry' has no attribute 'DEFAULT_ALLOWED_METHODS' HOT 2
- SyntaxError: getting error while pytesting in python 2.7
- SyntaxError: getting error while pytesting in python 2.7 HOT 1
- Receiving FCM notifications HOT 1
- android_channel_id is missing in multiple_devices_data_message
- what is the role of private and public key
- Any plans for migrating from lagecy HTTP to HTTPv1 ? HOT 6
- It looks like this bit of doco should be "default" and not "Default" HOT 1
- How to get registration_id HOT 2
- Add EMOJI in title HOT 1
- Fix async_notify_multiple_devices
- Default priority should be normal, not high
- Will PyFCM be affected by API discontinuance HOT 9
- async notify_single_device
- How I can send category in "aps" dictionary ?
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 pyfcm.