【问题标题】:Creating group conversations with attachments via unified api通过统一 api 创建带附件的群组对话
【发布时间】:2015-09-17 21:15:42
【问题描述】:

是否有人能够使用统一 api 将带有附件的对话发布到群组中?

我已经能够将对话发布到没有附件的群组(使用 https://msdn.microsoft.com/office/office365/HowTo/groups-rest-operations#PostToGroup 的示例),但无法弄清楚或找到有关如何使用附件执行此操作的示例。

在上面 URL 中指定的页面底部,有关于带有 Attachments 属性的 Post 对象的信息,但没有链接可以查看 Attachments 对象的外观。

【问题讨论】:

    标签: office365 office365api


    【解决方案1】:

    我还没有尝试过,但是您可以通过转到 https://graph.microsoft.com/beta/$metadata 来查看统一 API 的元数据。从上面看,Attachment 实体的结构似乎与Attachment entity in the Outlook APIs 相同。

    元数据的相关位:

    <EntityType Name="Attachment">
      <Key>
        <PropertyRef Name="Id"/>
      </Key>
      <Property Name="Id" Unicode="false" Type="Edm.String" Nullable="false"/>
      <Property Name="Name" Unicode="false" Type="Edm.String"/>
      <Property Name="ContentType" Unicode="false" Type="Edm.String"/>
      <Property Name="Size" Type="Edm.Int32" Nullable="false"/>
      <Property Name="IsInline" Type="Edm.Boolean" Nullable="false"/>
      <Property Name="DateTimeLastModified" Type="Edm.DateTimeOffset"/>
    </EntityType>
    
    <EntityType Name="FileAttachment" BaseType="Microsoft.Graph.Attachment">
      <Property Name="ContentId" Unicode="false" Type="Edm.String"/>
      <Property Name="ContentLocation" Unicode="false" Type="Edm.String"/>
      <Property Name="IsContactPhoto" Type="Edm.Boolean" Nullable="false"/>
      <Property Name="ContentBytes" Type="Edm.Binary"/>
    </EntityType>
    
    <EntityType Name="ItemAttachment" BaseType="Microsoft.Graph.Attachment">
      <NavigationProperty Name="Item" Type="Microsoft.Graph.OutlookItem" Nullable="false" ContainsTarget="true"/>
    </EntityType>
    

    【讨论】:

      猜你喜欢
      • 2022-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-11
      • 2019-04-09
      • 2016-12-21
      相关资源
      最近更新 更多