create method
POST /api/repos/{owner}/{repo}/cron
Implementation
Future<DroneCron> create({
required String owner,
required String repo,
required DroneCron requestBody,
}) async {
assert(
requestBody.name.isNotEmpty &&
requestBody.expr.isNotEmpty &&
requestBody.branch.isNotEmpty,
'You should provide [name,expr,branch]',
);
return await _dioService.request<DroneCron, DroneCron>(
path: Uri(
path: '/api/repos/$owner/$repo/cron',
),
method: HttpMethod.post,
body: requestBody.toJson(),
);
}