xdevplatform/twitter-ruby-ads-sdk

Implement Tweet Preview Support

brndnblck opened this issue · 1 comments

My recommendation is to build this out as:

  • Create a new TwitterAds::Tweet class.
  • Add a class method preview on TwitterAds::Tweet that takes status and opts={} as arguments. The optional params for GET /tweet/preview can be passed via the opts param.
  • Add an instance method preview on TwitterAds::Tweet that uses the current instance's @id and takes opts={} as optional arguments as well. This can use the GET /tweet/preview/:id version of the tweet preview.
  • Both versions of preview can just return the Response#body[:data] contents.

Happy to discuss more and totally open to alternate approaches. I can also point you toward some similar / relevant bits of code in the SDK if you need it.

Feel free to ask questions!