urbanairship / ruby-library

A Ruby wrapper for the Urban Airship API.
Other
200 stars 117 forks source link

Base URL https://go.airship.com/ returns 404 #117

Closed gmaffia closed 3 years ago

gmaffia commented 4 years ago

Hello,

It looks that the current server URL for the Urbanairship API just changed, but the library doesn't reflect this.

Expected Behavior

The API endpoint base URL should be https://go.urbanairship.com

Current Behavior

The API endpoint base URL currently is https://go.airship.com, which returns a 404 error

Possible Solution

Modify lib/urbanairship/common.rb line 8 to BASE_URL = "https://go.urbanairship.com/api"

Probably line 7 also needs to change to SERVER = "go.urbanairship.com"

Steps to Reproduce

Sending the following request returns a 404:

curl -X POST \ https://go.airship.com/api/push \ -H 'Accept: application/vnd.urbanairship+json; version=3;' \ -H 'Authorization: Basic <replace by base64 app_secret+master_secret>' \ -H 'Content-Type: application/json' \ -d ' { "audience": { "android_channel": "" }, "notification": { "alert": "Hello!" }, "device_types": [ "android" ] }'

Thanks.

sarahdactyl71 commented 4 years ago

Taking a look at this one and we will get back to you as soon as we can. Thank you for alerting us to this issue.

gmaffia commented 4 years ago

Hi! I created a PR for this issue. #119

cguess commented 4 years ago

For some odd reason my Bundler wasn't taking in the new tag 5.4.0 and wasn't upgrading me. Instead I had to change my Gemfile to reflect it explicitly, replacing the normal line withgem "urbanairship", tag: "5.4.0"

What would be best is if a new version of this was tied up and committed instead of just tags.

sarahdactyl71 commented 4 years ago

@cguess Sorry that running bundle update isn't working for you! Taking a look at this one and we will get back to you as soon as we can. We are working on releasing a new version later this month, so please keep an eye out for it. Not sure what you originally had in your gemfile originally, but just to be on the same page it should be this line: gem 'urbanairship', '~> 5.4'.