diff --git a/API.md b/API.md index dcd175c..040d5b6 100644 --- a/API.md +++ b/API.md @@ -31,33 +31,33 @@ ___ ### Index: -* [Instance](#method:constructor) +* [Instance](#method_constructor) * Localize the pass - * [.localize()](#method:localize) + * [.localize()](#method_localize) * Setting barcode - * [.barcode()](#method:barcode) - * [.backward()](#method:bBackward) - * [.autocomplete()](#method:bAutocomplete) + * [.barcode()](#method_barcode) + * [.backward()](#method_bBackward) + * [.autocomplete()](#method_bAutocomplete) * Setting expiration / voiding the pass - * [.expiration()](#method:expiration) - * [.void()](#method:void) + * [.expiration()](#method_expiration) + * [.void()](#method_void) * Setting relevance - * [.relevance()](#method:relevance) + * [.relevance()](#method_relevance) * Setting NFC - * [.nfc()](#method:nfc) + * [.nfc()](#method_nfc) * Setting Pass Structure Keys (primaryFields, secondaryFields, ...) - * [.push()](#prop:fields-push) - * [.pop()](#prop:fields-pop) - * [TransitType](#prop:transitType) + * [.push()](#prop_fields-push) + * [.pop()](#prop_fields-pop) + * [TransitType](#prop_transitType) * Generating the compiled pass. - * [.generate()](#method:generate) + * [.generate()](#method_generate)

___ - + + #### constructor() - ```javascript var pass = new Pass(options); @@ -96,9 +96,9 @@ The only differences stands in the way the only method below is used and how the > If you are designing your pass for a language only, you can directly replace the placeholders in `pass.json` with translation.
- + + #### .localize() - ```javascript pass.localize(lang, options); @@ -144,9 +144,9 @@ ___ **Setting barcodes**: ___ - + + #### .barcode() - ```javascript pass.barcode(data); @@ -204,9 +204,9 @@ To support versions prior to iOS 9, `barcode` key is automatically supported as **See**: [PassKit Package Format Reference # Barcode Dictionary](https://apple.co/2myAbst)
- + + #### .barcode().backward() - ```javascript pass.barcode(data).backward(format); @@ -242,9 +242,9 @@ pass ```
- + + #### .barcode().autocomplete() - ```javascript pass.barcode(data).autocomplete(); @@ -264,9 +264,9 @@ ___ **Setting expiration / void the pass**: ___ - + + #### .expiration() - ```javascript pass.expiration(date [, format]); @@ -295,9 +295,10 @@ If the parsing fails, the error will be emitted only in debug mode and the prope | date | String/date | The date on which the pass will expire | false | - | format | String | A custom format to be used to parse the date | true | undefined - + + #### .void() - + ```javascript pass.void(); ``` @@ -316,9 +317,9 @@ ___ **Setting relevance**: ___ - + + #### .relevance() - ```javascript pass.relevance(key, value [, relevanceDateFormat]); @@ -335,7 +336,7 @@ See [Apple Documentation dedicated page](https://apple.co/2QiE9Ds) for more. For the first two keys, the argument 'value' (which will be of type **Array\**) will be checked and filtered against a schema (one for type). -For *relevantDate*, the date is parsed in the same formats of [#expiration()](#method:expiration). For *maxDistance*, the value is simply converted as Number and pushed only with successful conversion. +For *relevantDate*, the date is parsed in the same formats of [#expiration()](#method_expiration). For *maxDistance*, the value is simply converted as Number and pushed only with successful conversion. **Arguments**: @@ -369,9 +370,9 @@ ___ **NFC Support**: ___ - + + #### .nfc() - ```javascript pass.nfc([data, ...]) @@ -406,9 +407,9 @@ Unlike method-set properties or overrides, to set fields inside areas (*primaryF
- + + #### .push() - ```javascript pass..push(...fields); @@ -461,9 +462,9 @@ pass.primaryFields.push({
- + + #### .pop() - ```javascript pass..pop(amount); @@ -494,9 +495,9 @@ pass.backFields.pop(5); // last five elements are popped out.
- + + #### .transitType - ```javascript pass.transitType = "PKTransitTypeAir"; @@ -518,9 +519,9 @@ As you can see in [examples folder](/examples), to send a .pkpass file, a basic
- + + #### .generate() - ```javascript pass.generate();