cloudflare/endpoints/workers/
list_bindings.rs1use super::WorkersBinding;
2use crate::framework::endpoint::{EndpointSpec, Method};
3use crate::framework::response::ApiSuccess;
4
5#[derive(Debug)]
8pub struct ListBindings<'a> {
9 pub account_id: &'a str,
11 pub script_name: &'a str,
13}
14
15impl EndpointSpec for ListBindings<'_> {
16 type JsonResponse = Vec<WorkersBinding>;
17 type ResponseType = ApiSuccess<Self::JsonResponse>;
18
19 fn method(&self) -> Method {
20 Method::GET
21 }
22
23 fn path(&self) -> String {
24 format!(
25 "accounts/{}/workers/scripts/{}/bindings",
26 self.account_id, self.script_name
27 )
28 }
29}