getRestApiId function in objects from office-js for OneNote

风流意气都作罢 提交于 2020-01-15 05:14:08

问题


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.

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?


回答1:


EDIT: We now support "GetRestApi" and it have documented it

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


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.



来源:https://stackoverflow.com/questions/44753454/getrestapiid-function-in-objects-from-office-js-for-onenote

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!