forked from TranzerDev/PKPassCreator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pass_dict.py
75 lines (75 loc) · 2.44 KB
/
pass_dict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
pass_dict = {
"formatVersion": 1,
"serialNumber": "randomness",
"webServiceURL": "https://example.com/passes/",
"authenticationToken": "vxwxd7J8AlNNFPS8k0a0FfUFtq0ewzFdc",
"locations": [
{"longitude": -122.3748889, "latitude": 37.6189722},
{"longitude": -122.03118, "latitude": 37.33182},
],
"barcode": {
"message": "123456789",
"format": "PKBarcodeFormatPDF417",
"messageEncoding": "iso-8859-1",
},
"organizationName": "Toy Town",
"description": "Toy Town Membership",
"logoText": "Toy Town",
"foregroundColor": "rgb(255, 255, 255)",
"backgroundColor": "rgb(197, 31, 31)",
"generic": {
"primaryFields": [{"key": "member", "value": "Johnny Appleseed"}],
"secondaryFields": [
{"key": "subtitle", "label": "MEMBER SINCE", "value": "2012"}
],
"auxiliaryFields": [
{"key": "level", "label": "LEVEL", "value": "Platinum"},
{
"key": "favorite",
"label": "FAVORITE TOY",
"value": "Bucky Ball Magnets",
"textAlignment": "PKTextAlignmentRight",
},
],
"backFields": [
{
"numberStyle": "PKNumberStyleSpellOut",
"label": "spelled out",
"key": "numberStyle",
"value": 200,
},
{
"label": "in Reals",
"key": "currency",
"value": 200,
"currencyCode": "BRL",
},
{
"dateStyle": "PKDateStyleFull",
"label": "full date",
"key": "dateFull",
"value": "1980-05-07T10:00-05:00",
},
{
"label": "full time",
"key": "timeFull",
"value": "1980-05-07T10:00-05:00",
"timeStyle": "PKDateStyleFull",
},
{
"dateStyle": "PKDateStyleShort",
"label": "short date and time",
"key": "dateTime",
"value": "1980-05-07T10:00-05:00",
"timeStyle": "PKDateStyleShort",
},
{
"dateStyle": "PKDateStyleShort",
"label": "relative date",
"key": "relStyle",
"value": "2013-04-24T10:00-05:00",
"isRelative": True,
},
],
},
}