Closed skunkworker closed 10 years ago
thanks, we will look into it.
http://simplificator.com +41 44 500 47 50
Pfingstweidstrasse 6 CH-8005 Zürich
Am Samstag, 8. März 2014 um 04:52 schrieb skunkworker:
I found a bug earlier that without encoding the description of a new notification it will fail but still create the notification server side, I have submitted this bug to Withings already as these show up with callback_urls that are nil, but are still in the list.
This pull request adds URI encoding and decoding to the description. The examples in the readme regarding notifications are not possible as they will fail with response code 432 "The signature (using Oauth) is invalid.", because the description is not getting URI encoded.
You can merge this Pull Request by running git pull https://github.com/skunkworker/simplificator-withings master Or view, comment on, or merge it at: https://github.com/simplificator/simplificator-withings/pull/12 Commit Summary Added URI encoding/decoding for notifications description.File Changes M lib/withings/notification_description.rb (https://github.com/simplificator/simplificator-withings/pull/12/files#diff-0) (2)
M lib/withings/user.rb (https://github.com/simplificator/simplificator-withings/pull/12/files#diff-1) (2)Patch Links: https://github.com/simplificator/simplificator-withings/pull/12.patch https://github.com/simplificator/simplificator-withings/pull/12.diff
— Reply to this email directly or view it on GitHub (https://github.com/simplificator/simplificator-withings/pull/12).
It also seems like they don't send back the callback_url when you are requesting the different notifications, which to me makes no sense at all as thats what you need in order to revoke it.
@skunkworker
Yes, it looks like the value is not sent back, it's actually as per API definition. I think this is wrong and withings API should return the url value. Can you give me a pointer to the bug report you send so i can +1 it?
As for your other changes:
I don't think we should abuse the comment field to store the URL. Also we can not rename the methods (at least not without deprecating them first and documenting this API breaking change).
Can not merge this as it would break other applications if we do not support the comment field anymore. Basically it boils down to withings having an API which does not return all the required data.
I found a bug earlier that without encoding the description of a new notification it will fail but still create the notification server side, I have submitted this bug to Withings already as these show up with callback_urls that are nil, but are still in the list. This pull request adds URI encoding and decoding to the description. The examples in the readme regarding notifications are not possible as they will fail with response code 432 "The signature (using Oauth) is invalid.", because the description is not getting URI encoded.