Skip to content

Commit

Permalink
API Endpoint for Events to be listed on the website /api/events (#343)
Browse files Browse the repository at this point in the history
* Added google calendar env vars in nuxt config.

* Added packages needed for google calendar api authentication

* Added events endpoint to list upcoming events from google cal

* Fixed formatting

* Fixed error handling

* Minor change to be consistent
  • Loading branch information
dgmouris authored May 20, 2024
1 parent 0e337f3 commit be4952a
Show file tree
Hide file tree
Showing 5 changed files with 332 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ MAILCHIMP_API_KEY=
MAILCHIMP_SERVER=
MAILCHIMP_LIST_ID=
# if null, it will be set to https://devedmonton.com
NUXT_PUBLIC_SITE_URL=
NUXT_PUBLIC_SITE_URL=
# these are needed for the google calendar api
GOOGLE_CALENDAR_ID=
GOOGLE_SERVICE_ACCOUNT_CREDENTIALS_JSON=
4 changes: 4 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default defineNuxtConfig({
server: process.env.MAILCHIMP_SERVER ?? 'us20',
listId: process.env.MAILCHIMP_LIST_ID,
},
googleCalendarAPI: {
googleCalendarId: process.env.GOOGLE_CALENDAR_ID,
serviceAccountCredentialsJSON: process.env.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS_JSON,
},
},

app: {
Expand Down
201 changes: 201 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"@vueuse/core": "^10.9.0",
"@vueuse/nuxt": "^10.9.0",
"eslint": "^9.0.0",
"google-auth-library": "^9.9.0",
"googleapis": "^136.0.0",
"happy-dom": "^13.10.1",
"nuxt": "^3.11.1",
"nuxt-icon": "^0.6.10",
Expand Down
Loading

0 comments on commit be4952a

Please sign in to comment.