简体   繁体   English

有什么方法可以通过 OneNote REST API 获取笔记(不仅仅是页面元素)上的标签?

[英]Any way to get the tag on a note (not just a page element) via OneNote REST API?

OneNote tags on page elements (eg <p> ) show up in the HTML content returned via the REST API prefixed with a data-tag= attribute.页面元素上的 OneNote 标签(例如<p> )显示在通过 REST API 返回的 HTML 内容中,前缀为data-tag=属性。 But if the complete note is tagged, that tag doesn't seem to show up in the returned content.但是如果完整的笔记被标记,该标记似乎不会出现在返回的内容中。

Or am I missing something?或者我错过了什么?

[EDIT] Here's a screenshot showing the complete note tagged as 'Important' (star symbol) : [编辑] 这是一个屏幕截图,显示了标记为“重要”(星号)的完整笔记: 在此处输入图片说明

I can't see anything in the returned content that relates to that tag:我在返回的内容中看不到与该标签相关的任何内容:

<html lang="en-US">
    <head>
        <title>Didi Chuxing = Jean Liu</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body data-absolute-enabled="true" style="font-family:Calibri;font-size:11pt">
        <div style="position:absolute;left:48px;top:67px;width:576px">
            <img width="480" height="270" src="https://www.onenote.com/api/v1.0/me/notes/[...]
            <br />
            <p lang="en-NZ" style="font-size:14pt;margin-top:0pt;margin-bottom:0pt">credit : Fast Company</p>
        </div>
    </body>
</html>

[EDIT] This question has led to a UserVoice request for this feature to be added in to the API. [编辑] 这个问题导致了UserVoice 请求将此功能添加到 API 中。 Only one vote so far - maybe this mention will get it more ;)到目前为止只有一票 - 也许这个提及会得到更多;)

The note-tag you are showing is in the title of the page.您显示的笔记标签位于页面标题中。

Currently, the OneNote API does not support returning note tags in the title.目前,OneNote API 不支持在标题中返回笔记标签。 This is different to note-tags in the body, because the title tag is returned in our API as part of the HTML->head->title - other note-tags are returned within the HTML->body.这与正文中的笔记标签不同,因为标题标签在我们的 API 中作为 HTML->head->title 的一部分返回 - 其他笔记标签在 HTML->正文中返回。 I believe the right way of representing this information is to add the data-tag attribute to the HTML->head->title element.我相信表示此信息的正确方法是将 data-tag 属性添加到 HTML->head->title 元素。

I suggest creating a UserVoice item for this feature.我建议为此功能创建一个 UserVoice 项目。

https://onenote.uservoice.com/forums/245490-onenote-developer-apis https://onenote.uservoice.com/forums/245490-onenote-developer-apis

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM