twitter: adding promoted_metrics to the API call
Signed-off-by: Alexis Pentori <alexis@status.im>
This commit is contained in:
parent
11efa92811
commit
36555d0c23
|
@ -10,7 +10,7 @@ data:
|
|||
connectorSubtype: api
|
||||
connectorType: source
|
||||
definitionId: 1c448bfb-8950-478c-9ae0-f03aaaf4e920
|
||||
dockerImageTag: '0.2.0'
|
||||
dockerImageTag: '0.2.1'
|
||||
dockerRepository: status-im/airbyte/source-twitter-fetcher
|
||||
githubIssueLabel: source-twitter-fetcher
|
||||
icon: twitter-fetcher.svg
|
||||
|
|
|
@ -71,6 +71,29 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"non_public_metrics": {
|
||||
"type": ["null", "object" ],
|
||||
"properties": {
|
||||
"impression_count": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"like_count": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"reply_count": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"retweet_count": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"url_link_clicks": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"user_profile_clicks": {
|
||||
"type": ["null", "number"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"organic_metrics": {
|
||||
"type": ["null", "object" ],
|
||||
"properties": {
|
||||
|
|
|
@ -71,7 +71,7 @@ class Tweet(HttpSubStream, Account):
|
|||
) -> str:
|
||||
account_id = stream_slice.get("parent").get("id")
|
||||
logger.info("Account id %s", account_id)
|
||||
return f"users/{account_id}/tweets?tweet.fields=text,public_metrics,non_public_metrics,organic_metrics,author_id,referenced_tweets,created_at"
|
||||
return f"users/{account_id}/tweets?tweet.fields=text,public_metrics,non_public_metrics,organic_metrics,author_id,referenced_tweets,promoted_metrics,created_at"
|
||||
|
||||
def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
|
||||
logger.debug("Twtter Response: %s", response.json())
|
||||
|
|
Loading…
Reference in New Issue