This file contains 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
const formatCommas = (num) => num.replace(/\B(?=(\d{3})+(?!\d))/g, ','); | |
/** | |
* @customfunction | |
*/ | |
function IMPORTALEXA(url) { | |
var output = ''; | |
var fetchedUrl = UrlFetchApp.fetch( | |
'https://www.alexa.com/siteinfo/' + url, | |
{ muteHttpExceptions: true } |
This file contains 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
$('#run').click(() => tryCatch(run)); | |
async function run() { | |
const response = await fetch(new Request('https://api.livecoinwatch.com/coins/single'), { | |
method: 'POST', | |
headers: new Headers({ | |
'content-type': 'application/json', | |
'x-api-key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', | |
}), | |
body: JSON.stringify({ |
This file contains 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
function run() { | |
var response = UrlFetchApp.fetch('https://api.livecoinwatch.com/coins/single', { | |
'method': 'post', | |
'headers': { | |
'Content-type': 'application/json; charset=UTF-8', | |
'x-api-key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', | |
}, | |
'payload': JSON.stringify({ | |
"currency": 'USD', | |
"code": 'ETH', |
This file contains 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
import requests | |
import json | |
payload = { | |
"currency": "USD", | |
"sort": "rank", | |
"order": "ascending", | |
"offset": 0, | |
"limit": 50, | |
"meta": True |