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

addcal

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

addcal - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "addcal",
"version": "2.0.0",
"version": "2.0.1",
"description": "Open-source web application utility for adding calendar events via certain platform API's (Google, etc.)",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -15,4 +15,6 @@ # AddCal [![Build Status](https://travis-ci.org/daleyjem/addcal.svg?branch=master)](https://travis-ci.org/daleyjem/addcal)

An example for Typescript...
```js
import AddCal from 'addcal';
import AddCal, {EventParams, generators} from 'addcal';

@@ -31,4 +33,15 @@ export class AppComponent {

public click_addEvent(eventData){
this.addCal.addEvent('google', eventData)
/**
* Add event to an api service (google, etc.)
*/
public click_addEvent(eventData, service /* 'google' */){
const params = new EventParams({
summary: eventData.summary, // 'Event Summary'
description: eventData.description, // 'Event description.'
start: eventData.start, // new Date()
duration: eventDate.duration, // 60 minutes
url: eventData.url // 'http://www.google.com'
});
this.addCal.addEvent(service, params)
.then(() => {

@@ -42,4 +55,19 @@ console.log('The reminder was added!');

}
/**
* Download an .ics file
*/
public click_downloadEvent(eventData, type /* 'ical' */){
const params = new EventParams({
summary: eventData.summary, // 'Event Summary'
description: eventData.description, // 'Event description.'
start: eventData.start, // new Date()
duration: eventDate.duration, // 60 minutes
url: eventData.url // 'http://www.google.com'
});
this.addCal.download(type, params); // Or use `generators.ICALENDAR` for 'type' param
}
}
```

@@ -86,4 +86,5 @@ import appConfig from './config';

export {default as EventParams} from './lib/models/event-params';
export const generators = {
ICALENDAR: 'ical'
};

@@ -18,3 +18,3 @@ import BaseCalendar from '../base-calendar';

* Adds an event to the user's Google calendar
* @param {*} params Event params to add
* @param {EventParams} params Event params to add
* @todo Actually implement the `gapi` calendar `insert` method

@@ -21,0 +21,0 @@ */

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