Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble using custom API endpoints #62

Closed
fwal opened this issue Nov 18, 2015 · 2 comments
Closed

Trouble using custom API endpoints #62

fwal opened this issue Nov 18, 2015 · 2 comments

Comments

@fwal
Copy link

fwal commented Nov 18, 2015

Hi!

After a quick test It seems like the support for using custom api endpoints isn't working using the apiRoot property.

The problem may be that the apiRoot property might not be recognised by gapi
(or is the root param undocumented? https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiclientloadname--------version-callback) as it looks like it's searching the global domain.

The code:

<google-client-loader id="api" name="test" version="v1" apiRoot="http://localhost:8080/_ah/api"></google-client-loader>

The response:

{"error":{"errors":[{"domain":"global","reason":"notFound","message":"Not Found"}],"code":404,"message":"Not Found"}}

[update]
Right now I've pinpointed the problem to the apiRoot property not being set via the attribute.
The apiRoot attribute is picked up and the value resides inside this.attributes['apiroot'] but this.apiRoot (on line 212 in google-client-loader.html) is undefined thus causing it to fail.

@fwal
Copy link
Author

fwal commented Nov 18, 2015

I realised that this might very well be an issue with the backend sdk, I'm looking into it...
google/google-api-javascript-client#175

@fwal
Copy link
Author

fwal commented Nov 24, 2015

Well... Realised that I've not formatted the attributes correctly (I wrote apiRoot= rather than api-root=)

All is good 👍

@fwal fwal closed this as completed Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant