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
18
18
{
19
19
/**
20
20
* @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
+ * }
21
28
*
22
29
* @return mixed
23
30
*/
24
- public function all ($ project_id )
31
+ public function all ($ project_id, array $ parameters = [] )
25
32
{
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 ));
27
41
}
28
42
29
43
/**
You can’t perform that action at this time.
0 commit comments