Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't not fetchCalendarObjects from calendar.dingtalk.com #222

Open
quanru opened this issue Nov 14, 2024 · 0 comments
Open

can't not fetchCalendarObjects from calendar.dingtalk.com #222

quanru opened this issue Nov 14, 2024 · 0 comments

Comments

@quanru
Copy link

quanru commented Nov 14, 2024

  const client = await createDAVClient({
    serverUrl: 'https://calendar.dingtalk.com',
    credentials: {
      username: 'u_vpsuz2c6',
      password: 'uvdgcwqn',
    },
    authMethod: 'Basic',
    defaultAccountType: 'caldav',
  });
  const calendars = await client.fetchCalendars();

  console.log('calendars: ', calendars);
  const calendarObjects = await client.fetchCalendarObjects({
    calendar: calendars[0],
    useMultiGet: true,
    expand: true,
  });
  console.log('calendarObjects: ', calendarObjects);
temp DEBUG=* node caldav.mjs
  tsdav:authHelper Basic auth token generated: dV92cHN1ejJjNjp1dmRnY3dxbg== +0ms
  tsdav:account Service discovery... +0ms
  tsdav:account Service discovery redirected to https://calendar.dingtalk.com/dav/principals/ +218ms
  tsdav:account Fetching principal url from path https://calendar.dingtalk.com/dav/principals/ +0ms
  tsdav:account Fetched principal url /dav/users/u_vpsuz2c6 +158ms
  tsdav:account Fetch home url from https://calendar.dingtalk.com/dav/users/u_vpsuz2c6 +1ms
  tsdav:account Fetched home url https://calendar.dingtalk.com/dav/u_vpsuz2c6 +127ms
calendars:  [
  {
    description: '',
    timezone: '',
    url: 'https://calendar.dingtalk.com/dav/u_vpsuz2c6/primary/',
    ctag: 1731380020279,
    calendarColor: { _attributes: [Object] },
    displayName: '我的日历(钉钉)',
    components: [ 'VEVENT', 'VAVAILABILITY', 'VFREEBUSY', 'VJOURNAL', 'VTODO' ],
    resourcetype: [ 'calendar', 'collection' ],
    syncToken: 'https://calendar.dingtalk.com/dav/sync-tokens/_empty_1731550565135',
    projectedProps: {},
    reports: [
      'principalPropertySearch',
      'freeBusyQuery',
      'calendarQuery',
      'principalMatch',
      'calendarMultiget',
      'syncCollection'
    ]
  }
]
  tsdav:calendar Fetching calendar objects from https://calendar.dingtalk.com/dav/u_vpsuz2c6/primary/ +0ms
calendarObjects:  []
➜  temp DEBUG=* node caldav.mjs
  tsdav:authHelper Basic auth token generated: dV92cHN1ejJjNjp1dmRnY3dxbg== +0ms
  tsdav:account Service discovery... +0ms
  tsdav:account Service discovery redirected to https://calendar.dingtalk.com/dav/principals/ +151ms
  tsdav:account Fetching principal url from path https://calendar.dingtalk.com/dav/principals/ +0ms
  tsdav:account Fetched principal url /dav/users/u_vpsuz2c6 +131ms
  tsdav:account Fetch home url from https://calendar.dingtalk.com/dav/users/u_vpsuz2c6 +0ms
  tsdav:account Fetched home url https://calendar.dingtalk.com/dav/u_vpsuz2c6 +162ms
calendars:  [
  {
    description: '',
    timezone: '',
    url: 'https://calendar.dingtalk.com/dav/u_vpsuz2c6/primary/',
    ctag: 1731380020279,
    calendarColor: { _attributes: [Object] },
    displayName: '我的日历(钉钉)',
    components: [ 'VEVENT', 'VAVAILABILITY', 'VFREEBUSY', 'VJOURNAL', 'VTODO' ],
    resourcetype: [ 'calendar', 'collection' ],
    syncToken: 'https://calendar.dingtalk.com/dav/sync-tokens/_empty_1731550675922',
    projectedProps: {},
    reports: [
      'principalPropertySearch',
      'freeBusyQuery',
      'syncCollection',
      'calendarQuery',
      'calendarMultiget',
      'principalMatch'
    ]
  }
]
  tsdav:calendar Fetching calendar objects from https://calendar.dingtalk.com/dav/u_vpsuz2c6/primary/ +0ms
calendarObjects:  []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant