Skip to content

Instantly share code, notes, and snippets.

export const fetchRates = functions.https.onRequest(async (request, response) => {
admin.initializeApp();
const coins = (await admin.firestore().collection('coins').get()).docs;
await Promise.all(
coins.map(async coin => {
const rate = (await axios.get(`https://api.coingecko.com/api/v3/simple/price?ids=${coin.id}&vs_currencies=eur,usd&include_24hr_change=true`)).data as Currency[];
console.log(rate);
})
);
response.json({result: `Rates updated`});
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/actionLabeling"
android:title="@string/title_nav_labeling"
android:icon="@drawable/ic_image_black_24dp"/>
<item android:id="@+id/actionBarcode"
android:title="@string/title_nav_barcode"
android:icon="@drawable/ic_image_black_24dp"/>
<item android:id="@+id/actionTextRecognition"
android:title="@string/title_nav_text"
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"
app:startDestination="@id/actionLabeling">
<fragment
android:id="@+id/actionLabeling"
android:name="be.maximedupierreux.mlkitdemo.android.ImageLabelingFragment"
android:label="fragment_image_labeling"