This is the Github Repository for the https://jccczerowaste.com/ website.
The sheets observed by the server are: "Interns", "Bins", "Tasks", "WeightHistory", "InactiveBins"
The first row of each sheet must have column names. These names are CaSe-SeNsiTive.
The "Interns" sheet has the following column names:
- internId
- firstName
- lastName
- username
- password
- role
The "Bins" sheet has the following column names:
- binId
- binType
- lastBinWeight
- isReturned
- location
- notes
The "Tasks" sheet has the following column names:
- taskId
- binId
- name
- deliveryDate
- location
- notes
- createdOn
- completionStatus
- internId
The "WeightHistory" sheet has the following column names:
- weightId
- binId
- weight
- dateEmptied
The "InactiveBins" sheet has the following column names:
- binId
- binType
- lastBinWeight
- isReturned
- location
- notes
- Go to Google Developers Console
- Create a project and then select it.
- Enable the Sheets API
- In the sidebar on the left, select APIs & Services > Library
- Search for "sheets"
- Click on "Google Sheets API"
- Click the blue "Enable" button
- Create a service account for your project
Go to the Google Developers Console and navigate to the API section. You should see a dashboard.
- Click on “Enable APIs” or “Library” which should take you to the library of services that you can connect to. Search and enable the Google Sheets API.
- Go to Credentials and select “Create credentials”.
- Select “Service Account” and proceed forward by creating this service account. It can be named whatever you want.
- Under “Role”, select Project > Owner or Editor, depending on what level of access you want to grant.
- Select JSON as the Key Type and click “Create”. This should automatically download a JSON file with your credentials.
- Rename this credentials file as client_secret.json and note it's location.
- Note the email address of the service account. The email address is also available in your client_secret.json file.
- Share the Google Spreadsheet with your service account using the email noted above. Select the "Can Edit" option.