Skip to content

Dr-Katherine-Johnson/Event

Repository files navigation

Event

Details for the event: shows date, title, hosts, along with the thumbnail for the first host. See fetch.js for data fetching.

Related Projects

Table of Contents

Usage

Some usage instructions

Requirements

  • Node 6.13.0
  • React
  • Webpack
  • Semantic UI

Installing Dependencies

From within the root directory:

npm install -g webpack
npm install

Development

For development mode this project uses nodemon and webpack watching for changes

npm run build:dev
npm run start:dev

Production

For production mode this project uses node and webpack in production

npm run build:prod
npm start

API

GET /event/:eventId

  • Returns information about an event, in JSON format
{
  "id": "NUMBER",
  "title": "STRING",
  "org_name": "STRING",
  "org_private": "BOOLEAN",
  "local_date_time": "STRING", // (in ISO 8601 format)
  "orgId": "STRING",
}

Example:

{
  "id": 56,
  "title": "Adaptive dedicated Graphic Interface",
  "org_name": "Eichmann - Hoeger",
  "org_private": true,
  "local_date_time": "2020-04-26T17:35:14.598Z",
  "orgId": "o0"
}

POST /event/:eventId

  • Adds a new event. The body of the POST request should be JSON, in the following format:
{
  "title": "STRING",
  "local_date_time": "STRING", // (in ISO 8601 format)
  "orgId": "NUMBER",
  // optional, defaults to null
  "series": {
    "frequency": {
      "day_of_week": "STRING",
      "interval": "NUMBER",
    },
    "description": "STRING"
  },
}

Example:

{
  "title": "Adaptive dedicated Graphic Interface",
  "local_date_time": "2020-04-26T17:35:14.598Z",
  "orgId": "o0",
  "series": {
    "frequency": {
      "day_of_week": "Sunday",
      "interval": 2,
    },
    "description": "Every 2nd Tuesday of the month until May 2020"
  },
}

PUT /event/:eventId

  • Updates (or partially updates) an event. The body of the PUT request should be JSON in the following format. To update a nested value, you must provide the nested value in the proper shape. Omitted values will not be deleted by updating other nested values.
{
  "title": "STRING",
  "local_date_time": "STRING", // (in ISO 8601 format)
  "orgId": "STRING",
  "series": {
    "frequency": {
      "day_of_week": "STRING",
      "interval": "NUMBER",
    },
    "description": "STRING",
  },
}

Example:

// title, local_date_time, orgId, series.frequency.day_of_week, & series.description
// will all retain their values, even though we are updating interval to 1 instead of 2.
{
  "series": {
    "frequency": {
      "interval": 1
    }
  }
}

DELETE /event/:eventId

  • Removes the target event

There is a redis cache available, with a schema for accessing keys as follows:

event:eventId

Example:

event:9123567

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages