also looking at this
Video Functionalities
#69
4 files
+190
-32
| @@ -3,19 +3,17 @@ | ||
| 3 | 3 | namespace Meema\MeemaClient\Functions; |
| 4 | 4 | |
| 5 | 5 | use Meema\MeemaClient\Client; |
| 6 | use Meema\MeemaClient\Traits\UrlResponse; | |
| 6 | 7 | |
| 7 | 8 | class Image |
| 8 | 9 | { |
| 10 | use UrlResponse; | |
| 11 | ||
| 9 | 12 | /** |
| 10 | 13 | * @var \Meema\MeemaClient\Client |
| 11 | 14 | */ |
| 12 | 15 | protected $client; |
| 13 | 16 | |
| 14 | /** | |
| 15 | * @var int | |
| 16 | */ | |
| 17 | protected $id; | |
| 18 | ||
| 19 | 17 | /** |
| 20 | 18 | * @var array |
| 21 | 19 | */ |
| @@ -1346,30 +1344,4 @@ class Image | ||
| 1346 | 1344 | |
| 1347 | 1345 | return $this; |
| 1348 | 1346 | } |
| 1349 | ||
| 1350 | /** | |
| 1351 | * Convert all parameters to string url. | |
| 1352 | * | |
| 1353 | * @return string | |
| 1354 | */ | |
| 1355 | public function toUrl() | |
| 1356 | { | |
| 1357 | $queryParams = ''; | |
| 1358 | ||
| 1359 | $index = 0; | |
| 1360 | ||
| 1361 | foreach ($this->args as $key => $param) { | |
| 1362 | $separator = '?'; | |
| 1363 | ||
| 1364 | if ($index) { | |
| 1365 | $separator = '&'; | |
| 1366 | } | |
| 1367 | ||
| 1368 | $queryParams .= "{$separator}{$key}={$param}"; | |
| 1369 | ||
| 1370 | $index++; | |
| 1371 | } | |
| 1372 | ||
| 1373 | return "https://dev-ops.mee.ma/glenn/1/5/people.jpg{$queryParams}"; | |
| 1374 | } | |
| 1375 | 1347 | } |