
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
github.com/appsynthasia/google-places-api
A Go client for the Google Places API. A work in progress, contributions welcome.
To install this package, run:
go get gopkg.in/maxhawkins/google-places-api.v1/places
package main
import (
"fmt"
"net/http"
"time"
"gopkg.in/maxhawkins/google-places-api.v1/places"
)
func main() {
service := places.NewService(http.DefaultClient, "<your api key>")
call := service.Nearby(37.7833, -122.4167) // San Francisco
call.Types = append(call.Types, places.Cafe)
call.Radius = 500
resp, err := call.Do()
if places.IsZeroResults(err) {
fmt.Println("no results")
return
}
if err != nil {
panic(err)
}
results := resp.Results
token := resp.NextPageToken
for token != "" {
time.Sleep(2 * time.Second) // Rate limit
call.PageToken = token
resp, err := call.Do()
if err != nil {
panic(err)
}
token = resp.NextPageToken
results = append(results, resp.Results...)
}
for _, result := range results {
fmt.Println(result.Name)
}
}
INVALID_REQUEST
response. Retrying the request with the same NextPageToken will return the next page of results.FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.