[英]How to integrate Office 365 REST API into my Ruby on Rails app?
I'm building a Ruby on Rails app, and I'd like to integrate some Office365 features. 我正在构建一个Ruby on Rails应用程序,我想集成一些Office365功能。
For instance I would like to book a meeting room, create an event in a calendar, or display a meeting rooms calendar (for availability check). 例如,我想预订会议室,在日历中创建活动,或显示会议室日历(用于可用性检查)。
I found this get a calendar view Office365 REST API but I dont understand how to use it. 我发现这是一个日历视图 Office365 REST API,但我不明白如何使用它。
I understand that I have to send a GET request (formated as explained in msdn.microsoft.com) with Rails, but I don't understand how to deal with the Response. 我知道我必须使用Rails发送GET请求(在msdn.microsoft.com中解释),但我不明白如何处理响应。 How can I retrieve the response, put it into a hash and display the information formated into my own Rail view ? 如何检索响应,将其放入哈希并显示格式化到我自己的Rail视图中?
Any tutorial, examples, or more explanatory doc than the (hardly readable) MSDN documentation would be much appreciated. 任何教程,示例或更多解释性文档,而不是(几乎不可读)的MSDN文档将不胜感激。
Take a look at https://dev.outlook.com/RestGettingStarted/Tutorial/ruby . 看看https://dev.outlook.com/RestGettingStarted/Tutorial/ruby 。 It parses the JSON response into objects (using JSON.parse
). 它将JSON响应解析为对象(使用JSON.parse
)。
I would use a gem that is good at making and parsing HTTP requests; 我会使用一个擅长制作和解析HTTP请求的gem; something like https://github.com/jnunemaker/httparty 像https://github.com/jnunemaker/httparty这样的东西
This is assuming you are making your requests server side. 这假设您正在向服务器端请求。 I would probably create models which correspond to the Office365 objects you want to model in your own app. 我可能会创建与您想要在自己的应用中建模的Office365对象相对应的模型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.