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

401 if geo not set #9

Closed
loeffel-io opened this issue Feb 18, 2020 · 1 comment · Fixed by #10
Closed

401 if geo not set #9

loeffel-io opened this issue Feb 18, 2020 · 1 comment · Fixed by #10
Assignees

Comments

@loeffel-io
Copy link

loeffel-io commented Feb 18, 2020

Hey,

I getting an 401 error when i try to set geo to "" - also without geo is not working.

ctx := context.Background()
	explore, err := gogtrends.Explore(ctx,
		&gogtrends.ExploreRequest{
			ComparisonItems: []*gogtrends.ComparisonItem{
				{
					Keyword: "Apple",
					Time:    "today+12-m",
				},
			},
			Category: 7, // Programming category
			Property: "",
		}, "de")

	if err != nil {
		log.Fatal(err)
	}

	overTime, err := gogtrends.InterestOverTime(ctx, explore[0], "de")

	if err != nil {
		log.Fatal(err)
	}

	log.Printf("%+v", overTime)
@groovili groovili self-assigned this Feb 20, 2020
@groovili groovili linked a pull request Feb 20, 2020 that will close this issue
@groovili
Copy link
Owner

groovili commented Feb 20, 2020

Hi @loeffel-io!
That problem was there because of API methods inconsistency and geo param.
I've added little hook, should be ok now in release v1.1.1
If not - please feel free to reach me and reopen an issue.

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 a pull request may close this issue.

2 participants