0.1.1 • Published 2 years ago
@recalldev/use-recall-calendar v0.1.1
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
- cd
example
yarn
yarn start
- Visit
http://localhost:1234
Typescript Docs
- cd
docs
npx http-server
- Visit
http://localhost:8080