如何使用RubyOutlook gem创建会议?

如何使用RubyOutlook gem创建会议?,ruby,rubygems,office365api,Ruby,Rubygems,Office365api,我是新来这里使用ruby和outlook的,发现了gem RubyOutlook,它是围绕office365和ruby的包装 我如何使用RubyOutlook gem创建会议请求,我们是否有任何帮助文件来创建会议请求gem很稀少,因此您必须查看。 创建oauth令牌后,如自述文件中所述,您需要调用create\u event,使用令牌、事件json负载、日历文件夹(默认日历为nil)和事件所有者用户的电子邮件: require 'ruby_outlook' outlook_client = Ru

我是新来这里使用ruby和outlook的,发现了gem RubyOutlook,它是围绕office365和ruby的包装

我如何使用RubyOutlook gem创建会议请求,我们是否有任何帮助文件来创建会议请求

gem很稀少,因此您必须查看。 创建oauth令牌后,如自述文件中所述,您需要调用
create\u event
,使用令牌、事件json负载、日历文件夹(默认日历为nil)和事件所有者用户的电子邮件:

require 'ruby_outlook'
outlook_client = RubyOutlook::Client.new
# ...
# create oauth token, as described in the readme
# ...
event_payload = 
{
  "Subject": "Discuss the Calendar REST API",
  "Body": {
    "ContentType": "HTML",
    "Content": "I think it will meet our requirements!"
  },
  "Start": {
      "DateTime": "2014-02-02T18:00:00",
      "TimeZone": "Pacific Standard Time"
  },
  "End": {
      "DateTime": "2014-02-02T19:00:00",
      "TimeZone": "Pacific Standard Time"
  },
  "Attendees": [
    {
      "EmailAddress": {
        "Address": "john@example.com",
        "Name": "John Doe"
      },
      "Type": "Required"
    }
  ]
}
outlook_client.create_event(token, event_payload, nil, 'john@example.com')
用于创建事件。这就是我获取事件负载的地方