elbuo8 / 4square-venues Goto Github PK
View Code? Open in Web Editor NEWSimple Go wrapper around 4square venue endpoint
Simple Go wrapper around 4square venue endpoint
Hey guys I think first off the example needs to be updated? if you just import the file like you can you still dont have access too NewFSVenuesClient
. You have to import it with a name like so import fs "github.com/elbuo8/4square-venues"
Then you can use fs.NewFSVenuesClient
.
Now for my problem past that. When I try to do the example like so:
var venues interface{}
fs := foursquare.NewFSVenuesClient(clientId, clientSecret)
params := make(map[string]string)
params["ll"] = "40.7,-74"
if v, e := fs.GetVenue(params); e == nil { // This is line 25
venues = v
} else {
fmt.Println(e)
}
I get this error:
2015/04/29 20:51:19 http: panic serving 127.0.0.1:57195: runtime error: invalid memory address or nil pointer dereference
goroutine 6 [running]:
net/http.func·011()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1130 +0xbb
github.com/elbuo8/4square-venues.(*FSClient).dispatchRequest(0xc20800c410, 0xc20803b7d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/digitalfiz/golibs/src/github.com/elbuo8/4square-venues/venues.go:58 +0xa63
github.com/elbuo8/4square-venues.(*FSClient).GetVenue(0xc20800c410, 0xc20803b7d0, 0x0, 0x0, 0x0, 0x0)
/Users/digitalfiz/golibs/src/github.com/elbuo8/4square-venues/venues.go:43 +0x6a
backend.BroHandler(0x5c6250, 0xc208044000, 0xc2080332b0)
backend/main.go:25 +0x217
net/http.HandlerFunc.ServeHTTP(0x3fb9b0, 0x5c6250, 0xc208044000, 0xc2080332b0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1265 +0x41
github.com/gorilla/mux.(*Router).ServeHTTP(0xc20800c0f0, 0x5c6250, 0xc208044000, 0xc2080332b0)
/Users/digitalfiz/golibs/src/github.com/gorilla/mux/mux.go:98 +0x297
net/http.(*ServeMux).ServeHTTP(0xc20803a690, 0x5c6250, 0xc208044000, 0xc2080332b0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1541 +0x17d
appengine_internal.handleFilteredHTTP(0x5c6250, 0xc208044000, 0xc2080332b0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/appengine_internal/api_dev.go:98 +0x413
net/http.HandlerFunc.ServeHTTP(0x3fb9a8, 0x5c6250, 0xc208044000, 0xc2080332b0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1265 +0x41
net/http.serverHandler.ServeHTTP(0xc208036240, 0x5c6250, 0xc208044000, 0xc2080332b0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc2080443c0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/net/http/server.go:1751 +0x35e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.