File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,26 @@ class Tags extends AbstractApi
1818{
1919 /**
2020 * @param int|string $project_id
21+ * @param array $parameters {
22+ *
23+ * @var string $order_by Return tags ordered by `name` or `updated` fields. Default is `updated`.
24+ * @var string $sort Return tags sorted in asc or desc order. Default is desc.
25+ * @var string $search Return list of tags matching the search criteria. You can use `^term` and `term$` to
26+ * find tags that begin and end with term respectively.
27+ * }
2128 *
2229 * @return mixed
2330 */
24- public function all ($ project_id )
31+ public function all ($ project_id, array $ parameters = [] )
2532 {
26- return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/tags ' ));
33+ $ resolver = $ this ->createOptionsResolver ();
34+ $ resolver ->setDefined ('order_by ' )
35+ ->setAllowedValues ('order_by ' , ['name ' , 'updated ' ]);
36+ $ resolver ->setDefined ('sort ' )
37+ ->setAllowedValues ('sort ' , ['asc ' , 'desc ' ]);
38+ $ resolver ->setDefined ('search ' );
39+
40+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'repository/tags ' ), $ resolver ->resolve ($ parameters ));
2741 }
2842
2943 /**
You can’t perform that action at this time.
0 commit comments