mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 22:25:24 +00:00
Update API.md
Generic improvements and fixes to API Document
This commit is contained in:
committed by
GitHub
parent
d2c97a0d6d
commit
d4f67d9b12
25
API.md
25
API.md
@@ -42,7 +42,7 @@ ___
|
|||||||
* Setting relevance
|
* Setting relevance
|
||||||
* [.beacons()](#method_beacons)
|
* [.beacons()](#method_beacons)
|
||||||
* [.locations()](#method_locations)
|
* [.locations()](#method_locations)
|
||||||
* [.relevantDate()][#method_revdate]
|
* [.relevantDate()](#method_revdate)
|
||||||
* Setting NFC
|
* Setting NFC
|
||||||
* [.nfc()](#method_nfc)
|
* [.nfc()](#method_nfc)
|
||||||
* Getting the current information
|
* Getting the current information
|
||||||
@@ -204,7 +204,7 @@ pass.barcodes({
|
|||||||
#### .barcode()
|
#### .barcode()
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
pass.barcode(data: string);
|
pass.barcode(chosenFormat: string): this;
|
||||||
```
|
```
|
||||||
|
|
||||||
**Returns**:
|
**Returns**:
|
||||||
@@ -498,7 +498,7 @@ pass.primaryFields.pop();
|
|||||||
|
|
||||||
#### .transitType
|
#### .transitType
|
||||||
|
|
||||||
```javascript
|
```typescript
|
||||||
pass.transitType = "PKTransitTypeAir";
|
pass.transitType = "PKTransitTypeAir";
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -522,26 +522,21 @@ As you can see in [examples folder](/examples), to send a .pkpass file, a basic
|
|||||||
|
|
||||||
#### .generate()
|
#### .generate()
|
||||||
|
|
||||||
```javascript
|
```typescript
|
||||||
pass.generate();
|
pass.generate(): Stream;
|
||||||
```
|
```
|
||||||
|
|
||||||
**Returns**: `Promise`
|
**Returns**: `Stream`
|
||||||
|
|
||||||
**Description**:
|
**Description**:
|
||||||
|
|
||||||
The returned Promise will contain a stream or an error.
|
Creates a pass zip as Stream.
|
||||||
|
|
||||||
**Examples**:
|
**Examples**:
|
||||||
|
|
||||||
```javascript
|
```typescript
|
||||||
pass.generate()
|
const passStream = pass.generate();
|
||||||
.then(stream => {
|
doSomethingWithPassStream(stream);
|
||||||
doSomethingWithPassStream();
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
doSomethingWithThrownError();
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
___
|
___
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user