Foursquareimageproxy.best()

get the best image of a venue based on the foursqaure id

This function will take the Foursquare venue ID as input and query the foursquare API on the user's behalf to get the JSON response of the venue detail, then return the image url of the best image

Usage

Hover over inputs/exits for more info.

var Foursquareimageproxy = require('machinepack-foursquareimageproxy');


// get the best image of a venue based on the foursqaure id

Foursquareimageproxy.best({

id: '40b28c80f964a5204df81ee3',

client_id: 'XYRA11GEUJ0GQSS4APL0VXCI1GZIHVRBQQIR0XB32GIEDUYT',

client_secret: 'H4JII1UI2AQK5VH4G1CASEN3XWFXM2KTY0OUWVKYZSZERR30',

size: 'width640',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

id required

The unique id for a Venue

'40b28c80f964a5204df81ee3'
client_id required

Your Foursquare app CLIENT_ID

'XYRA11GEUJ0GQSS4APL0VXCI1GZIHVRBQQIR0XB32GIEDUYT'
client_secret required

Your Foursquare app CLIENT_SECRET

'H4JII1UI2AQK5VH4G1CASEN3XWFXM2KTY0OUWVKYZSZERR30'
size

size string

'width640'

Exits

error

An unexpected error occurred.

success

OK.