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

Fix example URL shortener code #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix example URL shortener code #25

wants to merge 1 commit into from

Conversation

mla
Copy link

@mla mla commented Oct 23, 2016

The code in SYNOPSIS is broken. url() was never being called on the service.

There is still a problem with this example though. It looks like Google no longer allowed unauthenticated requests. I get a "quota exceeded" error when trying to run it.

They allow authentication through either OAuth or using API key. OAuth works fine.
With an API key, I don't see how to append it to the request URL. insert() is a POST method, but they expect you to append the key as a a query string (?key=)

I see there's specific code to handle the key parameter for a GET request, but I don't see any way to pass query parameters for non-GET requests.

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

Successfully merging this pull request may close these issues.

1 participant