also looking at this
add test case
#37
8 files
+106
-88
| @@ -60,12 +60,14 @@ class Media | ||
| 60 | 60 | return $this->all(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | if (! is_int($id)) { | |
| 64 | throw new InvalidFormatException(); | |
| 65 | } | |
| 66 | ||
| 67 | 63 | $ids = is_array($id) ? $id : func_get_args(); |
| 68 | 64 | |
| 65 | foreach ($ids as $id) { | |
| 66 | if (! is_int($id)) { | |
| 67 | throw new InvalidFormatException(); | |
| 68 | } | |
| 69 | } | |
| 70 | ||
| 69 | 71 | return $this->client->request('GET', 'media', ['media_ids' => $ids]); |
| 70 | 72 | } |
| 71 | 73 | |