@wallethero/sdk
Version:
TypeScript SDK for WalletHero API - manage pass templates and passes for Apple Wallet and Google Pay
51 lines (33 loc) • 1.24 kB
Markdown
TypeScript/JavaScript SDK for WalletHero API - Manage pass templates and passes for Apple Wallet and Google Pay.
```bash
npm install @wallethero/sdk
```
**Requirements:**
- Node.js 18+ (uses native fetch API)
- TypeScript 4+ (optional, but recommended for type safety)
```typescript
import WalletHero from "@wallethero/sdk";
const client = new WalletHero({
apiToken: "your-api-token",
// apiUrl is optional and defaults to https://api.wallethero.app
// timeout: 30000, // optional, defaults to 30 seconds
});
// Test connection
const isConnected = await client.ping();
console.log("Connected:", isConnected);
// Get current user information
const userInfo = await client.me();
console.log("User:", userInfo);
// Get API server information
const serverInfo = await client.serverInfo();
console.log("Server info:", serverInfo);
```
See [WalletHero API documentation](https://docs.wallethero.app/) for more details.
This SDK is part of the WalletHero platform. For questions, support, or feature requests, please contact the WalletHero team.
This SDK is proprietary software. See your WalletHero license agreement for usage terms.