mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
added Buffer Model to README
This commit is contained in:
25
README.md
25
README.md
@@ -140,7 +140,7 @@ ___
|
|||||||
|
|
||||||
<a name="usage_example"></a>
|
<a name="usage_example"></a>
|
||||||
|
|
||||||
## Usage example
|
## Usage Example - Folder Model
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
/**
|
/**
|
||||||
@@ -180,6 +180,29 @@ try {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage Example - Buffer Model
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
|
||||||
|
import { createPass, Pass } from "passkit-generator";
|
||||||
|
|
||||||
|
try {
|
||||||
|
const examplePass = await createPass({
|
||||||
|
model: {
|
||||||
|
"thumbnail": Buffer.from([ ... ]),
|
||||||
|
"icon": Buffer.from([ ... ]),
|
||||||
|
"pass.json": Buffer.from([ ... ]),
|
||||||
|
"it.lproj/pass.strings": Buffer.from([ ... ])
|
||||||
|
},
|
||||||
|
|
||||||
|
// The rest will be the same as above
|
||||||
|
|
||||||
|
} catch (err) {
|
||||||
|
doSomethingWithTheError(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
For more complex usage examples, please refer to [examples](https://github.com/alexandercerutti/passkit-generator/tree/master/examples) folder.
|
For more complex usage examples, please refer to [examples](https://github.com/alexandercerutti/passkit-generator/tree/master/examples) folder.
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|||||||
Reference in New Issue
Block a user