@helium/http
Version:
HTTP library for interacting with the Helium blockchain API
18 lines • 642 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Location_1 = __importDefault(require("../models/Location"));
class Locations {
constructor(client) {
this.client = client;
}
async get(h3Index) {
const url = `/locations/${h3Index}`;
const { data: { data: location } } = await this.client.get(url);
return new Location_1.default(this.client, location);
}
}
exports.default = Locations;
//# sourceMappingURL=Locations.js.map