vieter/src/client/jobs.v

14 lines
306 B
Coq
Raw Normal View History

module client
import build { BuildConfig }
2022-12-13 17:51:42 +01:00
// poll_jobs requests a list of new build jobs from the server.
2022-12-12 22:58:43 +01:00
pub fn (c &Client) poll_jobs(arch string, max int) ![]BuildConfig {
data := c.send_request<[]BuildConfig>(.get, '/api/v1/jobs/poll', {
2022-12-12 22:58:43 +01:00
'arch': arch
'max': max.str()
})!
return data.data
}