0.1.1 • Published 2 years ago

@recalldev/use-recall-calendar v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

useRecallCalendar

useRecallCalendar React hook that integrates with Recall AI's calendar APIs.

Install

You can install use-media with npm

npm install --save @recalldev/use-recall-calendar

or with yarn

yarn add @recalldev/use-recall-calendar

Usage

import useRecallCalendar from 'use-recall-calendar';

const CalendarView = () => {
  // Accepts configuration object
  const recallCalendarState = useRecallCalendar({
     userId: '',  // unique identifier for logged in user
     authUrl: '', // url to generate authentication token from

     recallCalendarApiHost: 'https://recall.ai/',
     recallCalendarApiNamespace: 'api/v1/calendar/',

     googleOAuthRedirectUri: 'https://recall.ai/api/v1/calendar/google_oauth_callback/', // Google OAuth Redirect URI
     googleOAuthClientId: '', // Google OAuth Client ID
     googleOAuthPermissionScopes: [
        'https://www.googleapis.com/auth/calendar.readonly', 
        'https://www.googleapis.com/auth/userinfo.email', 
        'https://www.googleapis.com/auth/userinfo.profile'
     ], // Permission scopes (must include calendar)
  });

  return (
    <div>
      {/* Calendar View Here */}
    </div>
  );
};

Run Demo App

  1. cd example
  2. yarn
  3. yarn start
  4. Visit http://localhost:1234

Typescript Docs

  1. cd docs
  2. npx http-server
  3. Visit http://localhost:8080