yorkosa
#1
Hi,
We started pulling data using the new endpoint that was recently released and one thing we realized that the Tweets data doesn’t include the Card Name(it was included in the Scoped Timeline).
As a second alternative, we can get the card name from the individual card tables except for one, which is the Video Conversation Card. When we pull data for this table it doesn’t seem to include the Card Name field.
Could you tell us how we can get the Card Name for Video Conversation Card?
Thanks
Ali
@juanshishido & @jrsyo I opened this GitHub issue also for the potential enhancement https://github.com/twitterdev/twitter-python-ads-sdk/issues/230 let me know if relevant or helpful.
Thanks,
Shaun
1 Like
The online documentation seems to indicate Name is an expected return value.
@yorkosa, @blondie9x, @terrycox: Thanks for the information.
You are correct that the new Tweets endpoint—GET accounts/:account_id/tweets—does not return the card object that Scoped Timeline returned. Instead, we return the card_uri. (The card object was inconsistent and included non-relevant fields, which caused lots of confusion.)
For video conversation cards, we should return a name attribute in the API response. I’ll confirm tomorrow. That field should be accessible via the SDK. What happens when you do something like card.name where card is a VideoConversationCard object?
Hi @juanshishido I don’t think it would have access to the name property because the class doesn’t have it defined as a resource property.
But to help move things forward I tested this approach. Here are the results.
card = VideoConversationCard.load(account_object, '72txg')
print(card)
AttributeError: 'VideoConversationCard' object has no attribute 'name'
#this worked on other hand
card = VideoConversationCard.load(account_object, '72txg')
print(card.id)
72txg
Thanks, @blondie9x.
I took a look at creative.py and it looks like we’re incorrectly setting the resource_property.
If you’d like to submit a PR to fix this, that would be great.
As an aside, I confirmed that the API itself does return a name for video conversation cards. The issue is with the SDK.
jrsyo
#8
Hi @blondie9x ,
I appreciate your kind help on this one! The PR is now merged, we will release a new version in the coming days.
Thanks,
Shohei
1 Like