forked from vieter-v/vieter
feat(cli): added some filter flags to GitRepo CLI
This commit is contained in:
parent
a39c1aa5eb
commit
401e0291e3
5 changed files with 77 additions and 22 deletions
|
|
@ -1,13 +1,14 @@
|
|||
module client
|
||||
|
||||
import models { BuildLog }
|
||||
import models { BuildLog, BuildLogFilter }
|
||||
import net.http { Method }
|
||||
import response { Response }
|
||||
import time
|
||||
|
||||
// get_build_logs returns all build logs.
|
||||
pub fn (c &Client) get_build_logs() ?Response<[]BuildLog> {
|
||||
data := c.send_request<[]BuildLog>(Method.get, '/api/logs', {})?
|
||||
pub fn (c &Client) get_build_logs(filter BuildLogFilter) ?Response<[]BuildLog> {
|
||||
params := models.params_from(filter)
|
||||
data := c.send_request<[]BuildLog>(Method.get, '/api/logs', params)?
|
||||
|
||||
return data
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue