diff --git a/src/Images/v2/Api.php b/src/Images/v2/Api.php index 0616763f9..ab3b330ca 100644 --- a/src/Images/v2/Api.php +++ b/src/Images/v2/Api.php @@ -44,6 +44,7 @@ public function getImages(): array 'marker' => $this->params->marker(), 'sortKey' => $this->params->sortKey(), 'sortDir' => $this->params->sortDir(), + 'sort' => $this->params->sort(), 'name' => $this->params->queryName(), 'visibility' => $this->params->queryVisibility(), 'memberStatus' => $this->params->queryMemberStatus(), diff --git a/src/Images/v2/Params.php b/src/Images/v2/Params.php index 4b8c31fd4..f26c2f030 100644 --- a/src/Images/v2/Params.php +++ b/src/Images/v2/Params.php @@ -113,6 +113,7 @@ public function queryMemberStatus(): array return [ 'location' => self::QUERY, 'type' => self::STRING_TYPE, + 'sentAs' => 'member_status', 'description' => 'Shows only images with this member status.', 'enum' => ['accepted', 'pending', 'rejected', 'all'], ]; @@ -142,6 +143,7 @@ public function querySizeMin(): array return [ 'location' => self::QUERY, 'type' => self::INT_TYPE, + 'sentAs' => 'size_min', 'description' => 'Shows only images with this minimum image size.', ]; } @@ -151,6 +153,7 @@ public function querySizeMax(): array return [ 'location' => self::QUERY, 'type' => self::INT_TYPE, + 'sentAs' => 'size_max', 'description' => 'Shows only images with this maximum image size.', ]; } @@ -164,6 +167,16 @@ public function queryTag(): array ]; } + public function sort(): array + { + return [ + 'location' => self::QUERY, + 'type' => self::STRING_TYPE, + 'description' => 'Sorts the response by one or more attribute and sort direction combinations. You can ' . + 'also set multiple sort keys and directions. Default direction is desc.' + ]; + } + public function contentType(): array { return [