1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
use crate::client::Graph; use graph_http::types::Collection; use graph_http::types::Content; use graph_http::GraphResponse; use graph_http::IntoResponse; use reqwest::Method; register_client!(ContractsRequest,); impl<'a, Client> ContractsRequest<'a, Client> where Client: graph_http::RequestClient, { get!({ doc: "# Get entity from contracts by key", name: get_contract, response: serde_json::Value, path: "/contracts/{{id}}", params: 1, has_body: false }); patch!({ doc: "# Update entity in contracts", name: update_contract, response: GraphResponse<Content>, path: "/contracts/{{id}}", params: 1, has_body: true }); delete!({ doc: "# Delete entity from contracts", name: delete_contract, response: GraphResponse<Content>, path: "/contracts/{{id}}", params: 1, has_body: false }); get!({ doc: "# Get entities from contracts", name: list_contract, response: Collection<serde_json::Value>, path: "/contracts", params: 0, has_body: false }); post!({ doc: "# Add new entity to contracts", name: create_contract, response: serde_json::Value, path: "/contracts", params: 0, has_body: true }); }