socialblade-com-api
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -11,3 +11,7 @@ | ||
function generateUrl (urlPrefix, source, username) { | ||
const userUrl = source === 'facebook' ? 'page' : 'user' | ||
const userUrlCriteria = { | ||
facebook: 'page', | ||
youtube: 'channel' | ||
} | ||
const userUrl = userUrlCriteria[source] || 'user' | ||
const urlSuffix = source === 'facebook' ? '' : '/monthly' | ||
@@ -14,0 +18,0 @@ return `${urlPrefix}https://socialblade.com/${source}/${userUrl}/${username}${urlSuffix}` |
{ | ||
"name": "socialblade-com-api", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Unofficial APIs for Socialblade.com website.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,3 @@ # Socialblade.com unofficial APIs | ||
1. `urlprefix`: Socialblade website is protected by Cloudflare, I use Scraperapi.com as prefix to bypass the blocks. | ||
2. `source`: [one of the followings](https://github.com/DavideViolante/socialblade-com-api/blob/master/functions.js#L1-L1). | ||
2. `source`: [one of the followings](https://github.com/DavideViolante/socialblade-com-api/blob/master/functions.js#L4). | ||
3. `username`: username on the specified source. | ||
@@ -14,0 +14,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17696
315