@@ -780,3 +780,45 @@ while (! feof($fp)) {
780
780
781
781
fclose($fp);
782
782
```
783
+
784
+ ### …access the Twitter Ads API?
785
+
786
+ The [ Twitter Ads API] ( https://dev.twitter.com/ads/overview ) allows partners to
787
+ integrate with the Twitter advertising platform in their own advertising solutions.
788
+ Selected partners have the ability to create custom tools to manage and execute
789
+ Twitter Ad campaigns.
790
+
791
+ When accessing the Ads API or Ads Sandbox API, access it by prefixing your call
792
+ with ` ads_ ` . Watch out for the usual replacements for in-url parameters,
793
+ particularly ` :account_id ` .
794
+
795
+ ** Tip:** For accessing the Ads Sandbox API, use the ` ads_sandbox_ ` prefix,
796
+ like shown further down.
797
+
798
+ Here is an example for calling the Twitter Ads API:
799
+
800
+ ``` php
801
+ $reply = $cb->ads_accounts_ACCOUNT_ID_cards_appDownload([
802
+ 'account_id' => '123456789',
803
+ 'name' => 'Test',
804
+ 'app_country_code' => 'DE'
805
+ ]);
806
+ ```
807
+
808
+ #### Multiple-method API calls
809
+
810
+ In the Twitter Ads API, there are multiple methods that can be reached by
811
+ HTTP ` GET ` , ` POST ` , ` PUT ` and/or ` DELETE ` . While Codebird does its best to guess
812
+ which HTTP verb you’ll want to use, it’s the safest bet to give a hint yourself,
813
+ like this:
814
+
815
+ ``` php
816
+ $reply = $cb->ads_sandbox_accounts_ACCOUNT_ID_cards_imageConversation_CARD_ID([
817
+ 'httpmethod' => 'DELETE',
818
+ 'account_id' => '123456789',
819
+ 'card_id' => '2468013579'
820
+ ]);
821
+ ```
822
+
823
+ Codebird will remove the ` httpmethod ` parameter from the parameters list automatically,
824
+ and set the corresponding HTTP verb.
0 commit comments