Error when querying email events with eventType parameter

オープン
#413 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

GET /email/public/v1/events に対する api_client.api_request 呼び出しから始め、クエリ文字列の処理を、issue にある動作する curl リクエストと比較してください。eventType がどのようにエンコードされるかを追跡し、その後、ドキュメントに記載された API パラメーターを変更せずに、SENT と DELIVERED が HubSpot のメールイベントエンドポイントで受け付けられることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Issue Description

When using the HubSpot API client to query email events, I encountered an error with the eventType parameter format. The API rejects the comma-separated list within curly braces:

response = api_client.api_request({
    "method": "GET",
    "path": "/email/public/v1/events",
    "qs": {
        "eventType": "{SENT,DELIVERED}",
    }
})
print(response.content.decode('utf-8'))

This results in the following error:

{"status":"error","message":"Invalid input JSON on line -1, column -1: Cannot deserialize value of type `com.hubspot.email.events.EventType` from String \"{SENT,DELIVERED}\": not one of the values accepted for Enum class: [DROPPED, UNBOUNCE, STATUSCHANGE, DELIVERED, FORWARD, BOUNCE, REPLY, PRINT, PROCESSED, UNSUBSCRIBED, SUPPRESSED, CLICK_ON_IDENTIFIED_LINK, SENT, SELECTED, SPAMREPORT, OPT_IN_CHANGE, DEFERRED, ERROR, OPEN, MTA_DROPPED, CLICK]","correlationId":"3196b1fe-b2fb-4498-b8f5-afa46570a809"}

Additional Information

https://developers.hubspot.com/docs/reference/api/analytics-and-events/email-analytics#get-email-events

I verified that the API endpoint itself works correctly with the following curl command, which successfully returns results:

curl --request GET --url 'https://api.hubapi.com/email/public/v1/events?eventType={SENT,DELIVERED}'
主要言語
Python
スター
434
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HubSpot/hubspot-api-python のほかの issue

HubSpot/hubspot-api-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。