MeetingTimeSuggestionResult(不返回所有预期结果)

时间:2019-01-02 19:10:39

标签: node.js microsoft-graph

我正在使用以下文档作为指导https://github.com/microsoftgraph/msgraph-sdk-javascript。调用findMeetingTimes API时,我可以在图形浏览器中的终端中返回相同的响应主体。问题在于终端中的响应不会返回MeetingTimeSlot,与会者eeAvaliabilty或位置,而是会返回MeetingTimeSlot的[对象]和与会者eeAvaliabilty和位置的[数组]。

我不确定这是否是预期的行为,但是有什么办法可以像在图形资源管理器中提到的所有时隙一样,在终端中显示[object] / [array]的实际详细信息以及与会者名单?请找到调用API的代码以及在终端中显示的结果的屏幕截图。任何帮助将不胜感激,因为这是继续之前的最后一步。谢谢。

var meetingTime = {
      
      attendees: [ 
        { 
          type: "required",  
          emailAddress: { 
            name: "John Doe",
            address: "jdoe@44321.onmicrosoft.com" 
          },
          type: "required",  
          emailAddress: { 
            name: "Jim Doe",
            address: "jidoe@44321.onmicrosoft.com" 
          },
          type: "required",  
          emailAddress: { 
            name: "Jane Doe",
            address: "jadoe@44321.onmicrosoft.com" 
          },
          type: "required",  
          emailAddress: { 
            name: "Bob Thomas",
            address: "bthomas@44321.onmicrosoft.com" 
          },
          type: "required",  
          emailAddress: { 
            name: "Tim Williams",
            address: "twilliams@44321.onmicrosoft.com" 
          }, 
        }
      ],  
      locationConstraint: { 
        isRequired: "false",  
        suggestLocation: "false",  
        locations: [ 
          { 
            resolveAvailability: "false",
            displayName: "Edison Ballroom" 
          } 
        ] 
      },  
      timeConstraint: {
        activityDomain:"unrestricted", 
        timeslots: [ 
          { 
            start: { 
              dateTime: "2019-01-03T16:00:00",  
              timeZone: "Pacific Standard Time" 
            },  
            end: { 
              dateTime: "2019-01-03T17:00:00",  
              timeZone: "Pacific Standard Time" 
            } 
          } 
        ] 
      },  
      meetingDuration: "PT1H",
      returnSuggestionReasons: true,
      minimumAttendeePercentage: 100.0,
    }

    try {
      const result = await client
      .api(`me/findMeetingTimes`)
      .post(meetingTime, (err, res) => {
          console.log(res)
      });

      res.render('meetingTime', params);
      params.debug = `Graph request returned: ${JSON.stringify(result, null, 2)}`
    } catch (err) {
      params.message = 'Error retrieving events';
      params.error = { status: `${err.code}: ${err.message}` };
      params.debug = JSON.stringify(err.body, null, 2);
      res.render('error', parms);
    }

enter image description here

0 个答案:

没有答案