forked from wmcmahan/react-native-calendar-events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.android.js
43 lines (32 loc) · 937 Bytes
/
index.android.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
'use strict'
import { NativeModules } from 'react-native'
var CalendarEvents = NativeModules.CalendarEvents
export default {
async authorizationStatus () {
return CalendarEvents.getCalendarPermissions()
},
async fetchAllEvents (startDate, endDate, calendars = []) {
return CalendarEvents.findAllEvents(startDate, endDate, calendars)
},
async findCalendars () {
return CalendarEvents.findCalendars();
},
async findEventById (id) {
return CalendarEvents.findById(id);
},
async authorizeEventStore () {
return CalendarEvents.requestCalendarPermissions()
},
async saveEvent (title, details) {
return CalendarEvents.saveEvent(title, details)
},
async removeEvent (id) {
return CalendarEvents.removeEvent(id)
},
async uriForCalendar () {
return CalendarEvents.uriForCalendar()
},
openEventInCalendar (eventID) {
CalendarEvents.openEventInCalendar(eventID)
}
}