Created
December 15, 2017 20:49
-
-
Save tristansokol/d1efb924a2edc2bf6157672bb37432b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SquareConnect = require('square-connect'); | |
var defaultClient = SquareConnect.ApiClient.instance; | |
// Configure OAuth2 access token for authorization: oauth2 | |
var oauth2 = defaultClient.authentications['oauth2']; | |
oauth2.accessToken = "sq0atp-xxxxxxxx"; | |
var api = new SquareConnect.LocationsApi(); | |
api.listLocations().then(function(data) { | |
console.log('API called successfully. Returned data: '); | |
console.log(data); | |
}, function(error) { | |
console.error(error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment