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
function COINGECKO(input = 'bitcoin', property = 'all', currency = 'usd') { | |
Logger.log(`Search for #> ${input} @prop: ${property} @currency: ${currency}`); | |
const cache = CacheService.getScriptCache(); | |
let coinData = cache.get(input); | |
if(!coinData){ | |
Logger.log('No cached coin data found! Let\'s fetch the api'); | |
const URL = `https://api.coingecko.com/api/v3/coins/markets?vs_currency=${currency}&ids=${input}&price_change_percentage=24h,7d,14d,30d,1y`; | |
try{ |
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
import React, {Component} from 'react'; | |
import {ActivityIndicator, AsyncStorage, Dimensions, FlatList, LayoutAnimation, StyleSheet, Text, TouchableHighlight, TouchableOpacity, View, Alert, Platform} from 'react-native'; | |
import Icon from 'react-native-vector-icons/Ionicons'; | |
import {Card, CardImage, CardTitle} from 'react-native-material-cards'; | |
import ActionButton from 'react-native-circular-action-menu'; | |
import ImagePicker from 'react-native-image-crop-picker'; | |
import {MaterialIndicator} from 'react-native-indicators'; | |
import Storage from 'react-native-storage'; | |
import {EventRegister} from 'react-native-event-listeners'; | |
import shortid from 'shortid'; |
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 retina = window.devicePixelRatio > 1; | |
if (retina) { | |
// the user has a retina display | |
} | |
else { | |
// the user has a non-retina display | |
} |