ReviewOS

also looking at this

meemalabs/meema-client-php

Bulk folders

#31
Merged glennmichael123 wants to merge bulk-folders into main
3 files +80 -14
src/Models/Tag.phpmodified+13-2
Changes to src/Models/Tag.php
@@ -127,10 +127,21 @@ class Tag
127127 */
128128 public function delete($id)
129129 {
130 if (! is_int($id)) {
131 throw new InvalidFormatException();
130 $ids = is_array($id) ? $id : func_get_args();
131
132 foreach ($ids as $id) {
133 if (! is_int($id)) {
134 throw new InvalidFormatException();
135 }
132136 }
133137
138 if (count($ids) > 1) {
139 return $this->client->request('POST', 'bulk/tags/delete', ['tag_ids' => $ids]);
140 }
141
142 // If count is equal to 1 get the first element
143 $id = $ids[0];
144
134145 return $this->client->request('DELETE', "tags/{$id}");
135146 }
136147