Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@555platform/555-calendar-sdk

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@555platform/555-calendar-sdk

Calendar SDK for 555 Platform

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
334
increased by16600%
Maintainers
5
Weekly downloads
 
Created
Source

Calendar

Overview

Calendar Library provides API'S to create calendar,events and reminders. A calendar is a container for events. These events can be single instance or repeating events. Repeating events will have ending time. Multiple calendars can be created per domain, for example, work and personal calendars. Events are associated with calendar type. Events can have reminders set on them.

Installation

npm install Calendar

Calendar API's

Calendar Library provides API's to Create,Read,Update and delete calendar for user.

Init :

init API is used to initialize server URL. init accepts a config parameter. config is of type object, which should have a property config.URL

import {Calendar} from 'Calendar';
Calendar.init("config")

Create Calendar :

createCalendar API is used to create calendar for user. we need to pass username and calendarname as parameters.

import {Calendar} from 'Calendar';
Calendar.createCalendar("username", "calendarname")

Handling Response

createCalendar API returns a promise. Response will have calendar deatils if call is successful otherwise error JSON with code and reason for error.

Calendar.createCalendar("Rahul","home").then(response => {
      console.log(" Calendarlist Data ::",response)
    }).catch(error => {
      console.log("get calendarlist failed ::", error);
    });
}
  

Get Calendar :

getCalendar API is used to get calendar details for user. we need to pass username as parameter.

import {Calendar} from 'Calendar';
Calendar.getCalendar("username")

Handling Response

getCalendar API returns a promise. Response will have calendar deatils if call is successful otherwise error JSON with code and reason for error.

Calendar.getCalendar("Rahul").then(response => {
      console.log(" Calendarlist Data ::",response)
    }).catch(error => {
      console.log("get calendarlist failed ::", error);
    });
}
  

Update Calendar :

updateCalendar API is used to update calendar details for user. we need to pass calendarId and calendarName as parameters.

import {Calendar} from 'Calendar';
Calendar.updateCalendar("calendarid","calendarname")

Handling Response

updateCalendar API returns a promise. Response will have calendar deatils if call is successful otherwise error JSON with code and reason for error.

Calendar.updateCalendar("1ea1f9d3b4a927b264c83c07", "home").then(response => {
      console.log(" Calendarlist updateds ::",response)
    }).catch(error => {
      console.log("get calendarlist failed ::", error);
    });
}
  

Delete Calendar :

deleteCalendar API is used to delete calendar of user. we need to pass calendarId as parameter.

import {Calendar} from 'Calendar';
Calendar.deleteCalendar("calendarid")

Handling Response

deleteCalendar API returns a promise. Response will have calendar deatils if call is successful otherwise error JSON with code and reason for error.

Calendar.deleteCalendar("1ea1f9d3b4a927b264c83c07").then(response => {
      console.log(" Calendarlist updateds ::",response)
    }).catch(error => {
      console.log("get calendarlist failed ::", error);
    });
}
  

Event API's

Calendar Library provides API's to create,update,cancel and delete events in calendar for user.

Create Event :

createEvent API is used to create event in calendar for user. we need to pass eventData as parameter.

Below is the eventdata need to be passed as parameter to createEvent API.

PropertyTypeDescription
calendar_idstringUnique calendar id
subjectjson
  • contentType - type of content
  • content - title of event
startjsonstart date and time of event
  • date_time - date and time
  • time_zone - timezone of user
endjsonend date and time of event
  • date_time - date and time
  • time_zone - timezone of user
locationstringlocation of calendar
allow_new_time_proposalsboolallow time to change
show_asstringstate of user
import {Calendar} from 'Calendar';
Calendar.createEvent({eventData})

Handling Response

createCalendar API returns a promise. Response will have event deatils if call is successful otherwise error JSON with code and reason for error.

  Calendar.createEvent(eventData).then((response) => {
      console.log("create event response ::",response)

  })
  .catch(error => {
      console.log(error);
  })
  

Update Event :

updateEvent API is used to update event for user. we need to pass userid,eventid and update event info as parameter.

import {Calendar} from 'Calendar';
Calendar.updateEvent(userid,eventid,updatedEventInfo)

Handling Response

updateEvent API returns a promise. Response will have event deatils if call is successful otherwise error JSON with code and reason for error.

  Calendar.updateEvent(userid,eventid,updatedEventInfo).then((response) => {
      console.log("create event response ::",response)

  })
  .catch(error => {
      console.log(error);
  })
  

Cancel Event :

cancelEvent API is used to cancel event for user. we need to pass userid,eventid as parameter.

import {Calendar} from 'Calendar';
Calendar.cancelEvent(userid,eventid)

Handling Response

cancelEvent API returns a promise. Response will have event deatils if call is successful otherwise error JSON with code and reason for error.

  Calendar.cancelEvent(userid,eventid).then((response) => {
      console.log("create event response ::",response)

  })
  .catch(error => {
      console.log(error);
  })
  

Delete Event :

deleteEvent API is used to delete event for user. we need to pass userid,eventid as parameter.

import {Calendar} from 'Calendar';
Calendar.deleteEvent(userid,eventid)

Handling Response

deleteEvent API returns a promise. Response will have event deatils if call is successful otherwise error JSON with code and reason for error.

  Calendar.deleteEvent(userid,eventid).then((response) => {
      console.log("create event response ::",response)

  })
  .catch(error => {
      console.log(error);
  })
  

Keywords

FAQs

Package last updated on 11 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc