{"action":"created","issue":{"url":"https://api.github.com/repos/m-wrzr/populartimes/issues/42","repository_url":"https://api.github.com/repos/m-wrzr/populartimes","labels_url":"https://api.github.com/repos/m-wrzr/populartimes/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/m-wrzr/populartimes/issues/42/comments","events_url":"https://api.github.com/repos/m-wrzr/populartimes/issues/42/events","html_url":"https://github.com/m-wrzr/populartimes/issues/42","id":326773532,"number":42,"title":"Huge amount of requests being sent to Google?","user":{"login":"stefankruijt","id":5945584,"avatar_url":"https://avatars1.githubusercontent.com/u/5945584?v=4","gravatar_id":"","url":"https://api.github.com/users/stefankruijt","html_url":"https://github.com/stefankruijt","followers_url":"https://api.github.com/users/stefankruijt/followers","following_url":"https://api.github.com/users/stefankruijt/following{/other_user}","gists_url":"https://api.github.com/users/stefankruijt/gists{/gist_id}","starred_url":"https://api.github.com/users/stefankruijt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefankruijt/subscriptions","organizations_url":"https://api.github.com/users/stefankruijt/orgs","repos_url":"https://api.github.com/users/stefankruijt/repos","events_url":"https://api.github.com/users/stefankruijt/events{/privacy}","received_events_url":"https://api.github.com/users/stefankruijt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-26T23:07:55Z","updated_at":"2018-05-27T00:56:07Z","closed_at":null,"author_association":"NONE","body":"When I'm trying to do a request for a small area there are thousands of requests being made to Google. For instance:\r\n\r\nlat1 = 36.150182\r\nlong1 = -86.783909\r\nlat2 = 36.152166\r\nlong2 = -86.779082\r\n\r\ndata = populartimes.get(apiKey,[\"bar\"], (lat1, long1), (lat2, long2))\r\nprint(data)\r\n\r\nI would expect a few calls since there should be at most 20 bars in that area. But in just a few minutes of trying I already hit the error: \"You exceeded your Query Limit for Google Places API Web Service\"\r\n\r\nWhen I checked the Google console I had a 1000 requests. I upgraded my Google Account to the free limit of 150.000 \r\nBut it looks like the request above makes at least 1000 requests? What am I doing wrong? Within minutes I suddenly already made 65,000 requests.\r\nI do see correct data coming back, so it's working great. But I would like to just make the right amount of calls to Google to not create a huge bill."},"comment":{"url":"https://api.github.com/repos/m-wrzr/populartimes/issues/comments/392297610","html_url":"https://github.com/m-wrzr/populartimes/issues/42#issuecomment-392297610","issue_url":"https://api.github.com/repos/m-wrzr/populartimes/issues/42","id":392297610,"user":{"login":"Porter97","id":23709938,"avatar_url":"https://avatars0.githubusercontent.com/u/23709938?v=4","gravatar_id":"","url":"https://api.github.com/users/Porter97","html_url":"https://github.com/Porter97","followers_url":"https://api.github.com/users/Porter97/followers","following_url":"https://api.github.com/users/Porter97/following{/other_user}","gists_url":"https://api.github.com/users/Porter97/gists{/gist_id}","starred_url":"https://api.github.com/users/Porter97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Porter97/subscriptions","organizations_url":"https://api.github.com/users/Porter97/orgs","repos_url":"https://api.github.com/users/Porter97/repos","events_url":"https://api.github.com/users/Porter97/events{/privacy}","received_events_url":"https://api.github.com/users/Porter97/received_events","type":"User","site_admin":false},"created_at":"2018-05-27T00:56:07Z","updated_at":"2018-05-27T00:56:07Z","author_association":"NONE","body":"From what I can see it does/should filter by type, limiting t he number of API requests. Be careful with typing mistakes though, capitalization anywhere (as in \"Bar\", instead of \"bar\") results in a general (as in no filter search)."}}
{"actor":{"display_login":"Porter97"}}