0

我正在使用Zendesk API Client gem,我无法在回复中包含评论我可以检索票证,但它不包含对该票证的评论我的代码如下

ticket = ZendeskAPI::Ticket.find(client, id: 34798)
p ticket

这是我得到的回应,我在这里有什么明显的遗漏吗?

{  
   "ticket"   =>   {  
      "url"      =>"https://baopals.zendesk.com/api/v2/tickets/34798.json",
      "id"      =>34798,
      "external_id"      =>nil,
      "via"      =>      {  
         "channel"         =>"api",
         "source"         =>         {  
            "from"            =>            {  

            },
            "to"            =>            {  

            },
            "rel"            =>nil
         }
      },
      "created_at"      =>2017-11-17 09:49:11      UTC,
      "updated_at"      =>2017-11-17 09:49:49      UTC,
      "type"      =>nil,
      "subject"      =>"V2 test ticket",
      "raw_subject"      =>"V2 test ticket",
      "description"      =>"1111111111111111111111111111111111111111111111111111111111111111111111",
      "priority"      =>"normal",
      "status"      =>"open",
      "recipient"      =>nil,
      "requester_id"      =>15534722228,
      "submitter_id"      =>15534722228,
      "assignee_id"      =>nil,
      "organization_id"      =>13463857128,
      "group_id"      =>nil,
      "collaborator_ids"      =>      [  

      ],
      "follower_ids"      =>      [  

      ],
      "forum_topic_id"      =>nil,
      "problem_id"      =>nil,
      "has_incidents"      =>false,
      "is_public"      =>true,
      "due_at"      =>nil,
      "tags"      =>      [  

      ],
      "custom_fields"      =>      [  
         {  
            "id"            =>114097936533,
            "value"            =>false
         },
         {  
            "id"            =>114097989754,
            "value"            =>false
         },
         {  
            "id"            =>61510988,
            "value"            =>false
         },
         {  
            "id"            =>114097437574,
            "value"            =>false
         },
         {  
            "id"            =>58345127,
            "value"            =>nil
         },
         {  
            "id"            =>76165848,
            "value"            =>nil
         },
         {  
            "id"            =>61403888,
            "value"            =>nil
         },
         {  
            "id"            =>60446708,
            "value"            =>nil
         }
      ],
      "satisfaction_rating"      =>nil,
      "sharing_agreement_ids"      =>      [  

      ],
      "fields"      =>      [  
         {  
            "id"            =>114097936533,
            "value"            =>false
         },
         {  
            "id"            =>114097989754,
            "value"            =>false
         },
         {  
            "id"            =>61510988,
            "value"            =>false
         },
         {  
            "id"            =>114097437574,
            "value"            =>false
         },
         {  
            "id"            =>58345127,
            "value"            =>nil
         },
         {  
            "id"            =>76165848,
            "value"            =>nil
         },
         {  
            "id"            =>61403888,
            "value"            =>nil
         },
         {  
            "id"            =>60446708,
            "value"            =>nil
         }
      ],
      "brand_id"      =>3123448,
      "allow_channelback"      =>false
   }
}
4

2 回答 2

1

Ticket Comments 实际上是此处记录的单独端点 - https://developer.zendesk.com/rest_api/docs/core/ticket_comments

看起来您可以使用 ticket.comments() 来获取评论

于 2017-12-08T09:12:12.530 回答
0

不是使用 Ruby 来处理我的数据,而是使用 Python 和评论实际上是描述和我的都融合在一起。到目前为止,这是我唯一看到的。你检查过 Ruby 的 API 文档吗?

于 2017-11-28T18:22:33.713 回答