Socket
Socket
Sign inDemoInstall

google-calendar-url

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    google-calendar-url

Generate shareable URLs for adding Google Calendar events


Version published
Weekly downloads
327
increased by4.81%
Maintainers
1
Install size
15.2 kB
Created
Weekly downloads
 

Readme

Source

google-calendar-url

Generate shareable URLs for adding Google Calendar events.

Features

Written in TypeScript and includes type definitions.

  • No dependencies
  • Works with vanilla JavaScript and TypeScript
  • Adheres to Semantic Versioning

Try it in a CodeSandbox.

Installation

yarn add google-calendar-url
# or
npm install google-calendar-url --save

Usage

import { googleCalendarEventUrl } from 'google-calendar-url';

const url = googleCalendarEventUrl({
  start: '20201212T100000Z',
  end: '20201212T110000Z',
  title: 'Event title',
  details: 'Event details',
  location: 'San Francisco',
});

console.log(url);

// https://calendar.google.com/calendar/event?action=TEMPLATE&dates=20201212T100000Z%2F20201212T110000Z&text=Event+title&details=Event+details&location=San+Francisco

Try the URL

API

The googleCalendarEventUrl function takes a single GoogleCalendarEventArgs argument.

interface GoogleCalendarEventArgs {
  /**
   * Start of event, acceptable formats are:
   *
   * 20200316T010000Z - UTC
   *
   * 20200316T010000 - Time local to the user
   *
   * 20200316 - All day event
   */
  start?: string;

  /**
   * End of event, acceptable formats are:
   *
   * 20200316T010000Z - UTC
   *
   * 20200316T010000 - Time local to the user
   *
   * 20200316 - All day event
   */
  end?: string;

  /** Event title */
  title?: string;

  /** Event location */
  location?: string;

  /** Event details */
  details?: string;
}

References

Maintainers

Keywords

FAQs

Last updated on 19 Mar 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc