🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

clay-instagram

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clay-instagram - npm Package Compare versions

Comparing version

to
0.0.3

2

package.json

@@ -9,3 +9,3 @@ {

"description": "An instagram embed component for Clay.",
"version": "0.0.2",
"version": "0.0.3",
"main": "server.js",

@@ -12,0 +12,0 @@ "repository": {

@@ -10,2 +10,16 @@ 'use strict';

/**
* determine if an instagram post should hide its caption
* @param {object} data
* @returns {string}
*/
function hideCaption(data) {
if (data.showThread === false) {
return '&hidecaption=true';
} else {
// if it's true (default) or undefined
return '';
}
}
/**
* grab html for tweet

@@ -19,3 +33,3 @@ * @param {string} ref

// note: we're using the un-authenticated api endpoint. don't abuse this
return fetch('https://api.instagram.com/oembed/?url=' + encodeURI(data.url) + '&omitscript=true')
return fetch('https://api.instagram.com/oembed/?url=' + encodeURI(data.url) + '&omitscript=true' + hideCaption(data))
.then(function (res) {

@@ -22,0 +36,0 @@ // get json from result

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet