hepcat72 / node-red-contrib-life360

GNU General Public License v3.0
3 stars 4 forks source link

Updates for the new API #17

Closed hepcat72 closed 11 months ago

hepcat72 commented 11 months ago

Resolves issue #16

The URL update worked for me, but other users have said it didn't work for them. I noted that getheaders (according to the request recorded in the response object) was retrieving a user agent from the form. That form may differ between node-red versions, so I decided to include it to be on the safe side. I could not test that it worked however, because I couldn't make it fail in the first place.

Another repo used a user agent derived from android, but I decided to keep it honest and make the user agent be the name of this module.

I also added error.response.data.errorMessage to the error message. Ideally, I would optionally include it based on whether its defined, but I think if it's not, as I found out through trial and error, if it doesn't exist, it will just print "undefined".

hepcat72 commented 11 months ago

@MaksimShakavin - FYI, I added you as a contributor in the package.json file.