Skip to content

Instantly share code, notes, and snippets.

@karakanb
Last active February 20, 2020 23:23
Show Gist options
  • Save karakanb/8a95a042496f897b94e19ffd1f55d410 to your computer and use it in GitHub Desktop.
Save karakanb/8a95a042496f897b94e19ffd1f55d410 to your computer and use it in GitHub Desktop.
module.exports.producthunt = (event, context, callback) => {
var url = 'https://api.producthunt.com/v1/posts?access_token=my-api-token';
helpers.get(url, output => {
callback(null, helpers.rawResponse(JSON.parse(output).posts));
}, err => callback(null, helpers.failure(err.message)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment