1 | <?php |
||
10 | class ScheduledTweet extends Analytics |
||
11 | { |
||
12 | const RESOURCE_COLLECTION = 'accounts/{account_id}/scheduled_tweets'; |
||
13 | const RESOURCE = 'accounts/{account_id}/scheduled_tweets/{id}'; |
||
14 | const RESOURCE_STATS = 'stats/accounts/{account_id}/scheduled_tweets/{id}'; |
||
15 | |||
16 | const ENTITY = 'SCHEDULED_TWEET'; |
||
17 | |||
18 | /** Read Only */ |
||
19 | protected $id; |
||
20 | protected $completed_at; |
||
21 | protected $user_id; |
||
22 | protected $scheduled_status; |
||
23 | |||
24 | protected $properties = [ |
||
25 | ScheduledTweetFields::SCHEDULED_AT, |
||
26 | ScheduledTweetFields::AS_USER_ID, |
||
27 | ScheduledTweetFields::TEXT, |
||
28 | ScheduledTweetFields::CARD_URI, |
||
29 | ScheduledTweetFields::MEDIA_KEYS, |
||
30 | ScheduledTweetFields::NULLCAST, |
||
31 | ]; |
||
32 | |||
33 | /** Writable */ |
||
34 | protected $scheduled_at; |
||
35 | protected $as_user_id; |
||
36 | protected $text; |
||
37 | protected $card_uri; |
||
38 | protected $media_keys; |
||
39 | protected $nullcast; |
||
40 | |||
41 | /** |
||
42 | * @param $metricGroups |
||
43 | * @param array $params |
||
44 | * @param bool $async |
||
45 | * @return mixed |
||
46 | * @throws BadRequest |
||
47 | * @throws \Hborras\TwitterAdsSDK\TwitterAdsException |
||
48 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\Forbidden |
||
49 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\NotAuthorized |
||
50 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\NotFound |
||
51 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\RateLimit |
||
52 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\ServerError |
||
53 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\ServiceUnavailable |
||
54 | */ |
||
55 | public function stats($metricGroups, $params = [], $async = false) |
||
60 | |||
61 | /** |
||
62 | * Saves or updates the current object instance depending on the |
||
63 | * presence of `object->getId()`. |
||
64 | */ |
||
65 | public function save() |
||
80 | |||
81 | /** |
||
82 | * @return mixed |
||
83 | */ |
||
84 | public function getId() |
||
88 | |||
89 | /** |
||
90 | * @param array $properties |
||
91 | */ |
||
92 | public function setProperties($properties) |
||
96 | |||
97 | /** |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public function completed_at() |
||
104 | |||
105 | /** |
||
106 | * @return mixed |
||
107 | */ |
||
108 | public function user_id() |
||
112 | |||
113 | /** |
||
114 | * @return mixed |
||
115 | */ |
||
116 | public function scheduled_status() |
||
120 | |||
121 | /** |
||
122 | * @return array |
||
123 | */ |
||
124 | public function properties(): array |
||
128 | |||
129 | /** |
||
130 | * @return mixed |
||
131 | */ |
||
132 | public function scheduled_at() |
||
136 | |||
137 | /** |
||
138 | * @return mixed |
||
139 | */ |
||
140 | public function as_user_id() |
||
144 | |||
145 | /** |
||
146 | * @return mixed |
||
147 | */ |
||
148 | public function text() |
||
152 | |||
153 | /** |
||
154 | * @return mixed |
||
155 | */ |
||
156 | public function card_uri() |
||
160 | |||
161 | /** |
||
162 | * @return mixed |
||
163 | */ |
||
164 | public function media_keys() |
||
168 | |||
169 | /** |
||
170 | * @return mixed |
||
171 | */ |
||
172 | public function nullcast() |
||
176 | |||
177 | /** |
||
178 | * @param mixed $scheduled_at |
||
179 | */ |
||
180 | public function setScheduledAt($scheduled_at): void |
||
184 | |||
185 | /** |
||
186 | * @param mixed $as_user_id |
||
187 | */ |
||
188 | public function setAsUserId($as_user_id): void |
||
192 | |||
193 | /** |
||
194 | * @param mixed $text |
||
195 | */ |
||
196 | public function setText($text): void |
||
200 | |||
201 | /** |
||
202 | * @param mixed $card_uri |
||
203 | */ |
||
204 | public function setCardUri($card_uri): void |
||
208 | |||
209 | /** |
||
210 | * @param mixed $media_keys |
||
211 | */ |
||
212 | public function setMediaKeys($media_keys): void |
||
216 | |||
217 | /** |
||
218 | * @param mixed $nullcast |
||
219 | */ |
||
220 | public function setNullcast($nullcast): void |
||
224 | } |