use super::WorkersBinding;
use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::ApiSuccess;
#[derive(Debug)]
pub struct ListBindings<'a> {
pub account_id: &'a str,
pub script_name: &'a str,
}
impl EndpointSpec for ListBindings<'_> {
type JsonResponse = Vec<WorkersBinding>;
type ResponseType = ApiSuccess<Self::JsonResponse>;
fn method(&self) -> Method {
Method::GET
}
fn path(&self) -> String {
format!(
"accounts/{}/workers/scripts/{}/bindings",
self.account_id, self.script_name
)
}
}