An open API service indexing awesome lists of open source software.

https://github.com/aamijar/team2059-scouting-firebase

Cloud functions that update firestore database with the latest FIRST® Robotics Competition events, teams, and avatars
https://github.com/aamijar/team2059-scouting-firebase

firebase frc frc-scouting robotics-competition

Last synced: about 2 months ago
JSON representation

Cloud functions that update firestore database with the latest FIRST® Robotics Competition events, teams, and avatars

Awesome Lists containing this project

README

          

# team2059-scouting-firebase
Node.js 10 Node.js 10

Cloud functions that update firestore database with the latest FIRST® Robotics Competition events, teams, and avatars

Updating the database can take ~20 minutes because of the amount of requests (with a 3 second delay) that must be made to the FIRST® events API.

Therefore it is best to split up the task into several functions since each has a timeout of 9 minutes in google cloud.
The first function is triggered by an http endpoint and the latter three are chained using pubsub messages.

It is highly advised to test functions using an emulator:

```
$ firebase emulators:start
```

In order to deploy to production environment:
```
$ firebase deploy
```

In order to update the database manually you can visit the url below. You must be authenticated using gcloud sdk otherwise you will recieve a forbidden error.
```
$ curl https://us-central1-team2059-scouting.cloudfunctions.net/updateFirestore -H
"Authorization: bearer $(gcloud auth print-identity-token)"
```