用于OneNote的office-js对象中的getRestApiId函数 [英] getRestApiId function in objects from office-js for OneNote

查看:90
本文介绍了用于OneNote的office-js对象中的getRestApiId函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为OneNote开发外接程序,但在使用OneNote REST API时遇到了麻烦,因为office-js不能提供与REST API兼容的ID. StackOverflow

I'm developing add-in for OneNote and I've had trouble use OneNote REST APIs, as office-js doesn't give ID compatible with REST APIs. StackOverflow UserVoice
And as I know that the ID from office-js is not unique, I had to retrieve data from REST API using clientUrl to get the unique ID and it took around 5-6 secs per each call. It was our big issue and couldn't find any workaround for this.

但是几个月后,我发现office-js的对象中有一个名为getRestApiId的函数,令人惊讶的是,它在我的测试中可以完美地工作.我不确定这是最近添加的,也许还没准备好使用,或者它在那里.我找不到有关此的任何信息.
任何人都可以确认使用还是仍在开发中吗?

But after a few months, I just found there is a function named getRestApiId in objects from office-js and surprisingly it works perfect in my tests. I'm not sure this is added recently and maybe not ready to use, or it was there. I can't find any information about this.
Could anyone confirm whether it's good to use or still under developing?

推荐答案

我们现在支持"GetRestApi",并且已经对其进行了记录

We now support "GetRestApi" and it have documented it

https://github .com/OfficeDev/office-js-docs/blob/master/reference/onenote/page.md#getRestApiId

OLD:您会发现它不适用于所有类型的帐户(仅Office365帐户),这就是未公开记录此文件的原因.我们确实计划尽快使它适用于所有类型的帐户.

OLD: You'll find that it doesn't work for all types of accounts (only Office365 accounts) - which is why this isn't publicly documented. We do plan to make it work for all types of accounts soon.

这篇关于用于OneNote的office-js对象中的getRestApiId函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆