@boulevard/blvd-book-sdk
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "@boulevard/blvd-book-sdk", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A JS client for the Boulevard API", | ||
@@ -5,0 +5,0 @@ "main": "lib/blvd.js", |
@@ -18,2 +18,8 @@ # Blvd Book SDK | ||
Install the SDK | ||
```sh | ||
yarn -D add @boulevard/blvd-book-sdk | ||
``` | ||
### Client-Side | ||
@@ -24,3 +30,3 @@ | ||
```js | ||
import { Blvd } from "blvd-book"; | ||
import { Blvd } from "@boulevard/blvd-book-sdk"; | ||
@@ -31,8 +37,10 @@ // Step 1: Create a `business` object to interact with the API. | ||
// Step 2: Choose a location and start by creating a cart | ||
const locations = client.locations.list(); | ||
const cart = await client.carts.create(locations[0]); | ||
const business = await client.businesses.get(); | ||
const locations = await business.getLocations(); | ||
let cart = await client.carts.create(locations[0]); | ||
// Step 3: Select and add items to the card | ||
const item = cart.availableCategories[0].availableItems[0]; | ||
await cart.addItem(item); | ||
cart = await cart.addBookableItem(item); | ||
@@ -59,3 +67,3 @@ // Step 4: Find available timeslots | ||
exp_month: 1, | ||
exp_year: 2020 | ||
exp_year: 2025 | ||
} | ||
@@ -62,0 +70,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
602121
70