HackRU / frontendv2

Running it back.
https://frontendv2-six.vercel.app
5 stars 2 forks source link

Make Schedule on Landing Page Pull from API #1

Open kevinmonisit opened 6 months ago

kevinmonisit commented 6 months ago

As a visitor, I want to see the LIVE schedule pulled directly from the API instead of a hardcoded version so that I'm up to date.

image

Important Information

The goal is converting data from one form to another.

The API endpoint: https://github.com/HackRU/lcs/wiki/LCS-API-Endpoints#dayof-events

THE GOAL

Create a function that converts the following content:

{
  "kind": "calendar#event",
  "etag": etag,
  "id": string,
  "status": string,
  "htmlLink": string,
  "created": datetime,
  "updated": datetime,
  "summary": string,
  "description": string,
  "location": string,
  "colorId": string,
  "creator": {
    "id": string,
    "email": string,
    "displayName": string,
    "self": boolean
  },
  "organizer": {
    "id": string,
    "email": string,
    "displayName": string,
    "self": boolean
  },
  "start": {
    "date": date,
    "dateTime": datetime,
    "timeZone": string
  },
  "end": {
    "date": date,
    "dateTime": datetime,
    "timeZone": string
  },
  "endTimeUnspecified": boolean,
  "recurrence": [
    string
  ],
  "recurringEventId": string,
  "originalStartTime": {
    "date": date,
    "dateTime": datetime,
    "timeZone": string
  },
..., etc

to this:

image

The Events content looks like this: https://developers.google.com/calendar/api/v3/reference/events#resource

Note: only use what is relevant from the payload to create the schedule info

You can call this function convertGoogleCalToSchedule or whatever you want. This will take place in data.ts. Implement however you like. Please pull from the main branch.

kevinmonisit commented 6 months ago

assigned to adeel