UNPKG

spot-sdk-ts

Version:

TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics

30 lines 1.47 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.LocalGridServiceClientImpl = exports.protobufPackage = void 0; /* eslint-disable */ const local_grid_1 = require("./local_grid"); const minimal_1 = __importDefault(require("protobufjs/minimal")); exports.protobufPackage = "bosdyn.api"; class LocalGridServiceClientImpl { rpc; constructor(rpc) { this.rpc = rpc; this.GetLocalGridTypes = this.GetLocalGridTypes.bind(this); this.GetLocalGrids = this.GetLocalGrids.bind(this); } GetLocalGridTypes(request) { const data = local_grid_1.GetLocalGridTypesRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.LocalGridService", "GetLocalGridTypes", data); return promise.then((data) => local_grid_1.GetLocalGridTypesResponse.decode(new minimal_1.default.Reader(data))); } GetLocalGrids(request) { const data = local_grid_1.GetLocalGridsRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.LocalGridService", "GetLocalGrids", data); return promise.then((data) => local_grid_1.GetLocalGridsResponse.decode(new minimal_1.default.Reader(data))); } } exports.LocalGridServiceClientImpl = LocalGridServiceClientImpl; //# sourceMappingURL=local_grid_service.js.map