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
- Host: GitHub
- URL: https://github.com/aamijar/team2059-scouting-firebase
- Owner: aamijar
- Created: 2020-10-17T05:09:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-12T22:26:48.000Z (over 3 years ago)
- Last Synced: 2025-04-12T21:07:15.921Z (about 1 year ago)
- Topics: firebase, frc, frc-scouting, robotics-competition
- Language: JavaScript
- Homepage:
- Size: 79.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# team2059-scouting-firebase

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)"
```