Back end de Pass & Digi Promo App Par CHHAN Malin ~ Mardi 21, mai 2013
Back end de Pass & Digi Promo App
Par CHHAN Malin ~ Mardi 21, mai 2013
Contenu
I. Création et distribution de Pass
II. Mise à jour le nouvel Pass
III. Base de données
IV. Web service API de Pass
V. Digi Promo App
VI. Démo1
I. Création et distribution de
Pass
Admin Remplir les information de client
client
Copier le lien démontré à sarfari dans iPod-touch ou iPhone
Ajouter Pass à Passbook2
Example de création et distribution de Pass
3
Admin
Aller à :http://localhost/passesWebserver/createPass/
Remplir les information de client
Information de
client
4
Lien démontré
5
Client obtient Pass
6
II. Mise à jour le nouvel Pass
Admin
Add new location
Edit other info
Edit location info
Delete location
new Pass
7
II. Mise à jour le nouvel Pass
Server APNS
………….
pushToken1
pushToken2
pushToken..
8
Example de nouvel pass avec
Push notification
9
III. Base de données
10
Tableaux détailées
11
Tableaux détailées
12
Tableaux détailées
13
Tableaux détailées
14
Tableaux détailées
15
Tableaux détailées
16
Tableaux détailées
17
IV. Web service API de Pass
1. Registering Device
2. Getting the Serial Numbers for Passes Associated with a Device
3. Getting the Latest Version of a Pass
4. Unregistering a device
5. Logging Errors 18
1. Registering Device
POST request to version/devices/<deviceLibraryIdentifier>/registrations/<passTypeIdentifier>/<serialNumber>
EX:
Generating POST request with URL <http:/192.168.1.106/passesWebserver/webService/v1/devices/a87fc03c8b17142c8f0f01c02fe77417/registrations/pass.cam-mob.passbookpasstest/1> 1
9
Response for success Registering Device
Response for Registering
Meaning
201 Registration succeeds
200 Serial number is already registered for this device
401 Request is not authorizedEX:
Register task (for device a87fc03c8b17142c8f0f01c02fe77417, pass type pass.cam-mob.passbookpasstest, serial number 1; with web service url http://192.168.1.106/passesWebserver/webService/) got response with code 201 2
0
2. Getting the Serial Numbers for
Passes Associated with a Device
GET request to webServiceURL/version/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier?passesUpdatedSince=tag
EX:
Generating GET request with URL <http:/192.168.1.106/passesWebserver/webService/v1/devices/a87fc03c8b17142c8f0f01c02fe77417/registrations/pass.cam-mob.passbookpasstest>
21
Response for Getting the Serial Numbers for
Passes Associated with a Device for 1
device
Ex:
- Get serial #s task (for device a87fc03c8b17142c8f0f01c02fe77417, pass type pass.cam-mob.passbookpasstest, last updated (null); with web service url http://192.168.1.106/passesWebserver/webService/) got response with code 200
- Get serial numbers task completed with update tag 1369106116, serial numbers ( 1)
Response for Getting Serial Numbers
Meaning
200 There are matching passes.
204 There is no matching pass.
401 Request is not authorized.
22
3. Getting the Latest Version of a
Pass
GET request to webServiceURL/version/passes/passTypeIdentifier/serialNumber
EX:
Generating GET request with URL <http:/192.168.1.106/passesWebserver/webService/v1/passes/pass.cam-mob.passbookpasstest/1>
23
Response for Getting the Latest Version of a Pass
Ex:
- Get pass task (pass type pass.cam-mob.passbookpasstest, serial number 1, if-modified-since Tue, 21 May 2013 10:35:42 GMT + 7; with web service url http://192.168.1.106/passesWebserver/webService/) got response with code 304
- Get pass task (pass type pass.cam-mob.passbookpasstest, serial number 2, if-modified-since Tue, 21 May 2013 11:09:41 GMT + 7; with web service url http://192.168.1.106/passesWebserver/webService/) got response with code 200
Response for Getting latest Pass
Meaning
200 Request is authorized.
304 Pass has not changed.
401 Request is not authorized.
24
4. Unregistering a device
DELETE request to webServiceURL/version/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber
Ex:
Generating DELETE request with URL <http:/192.168.1.106/passesWebserver/webService/v1/devices/a87fc03c8b17142c8f0f01c02fe77417/registrations/pass.cam-mob.passbookpasstest/1>
25
Response for Unregistering a
device
Ex:
Unregister task (for device a87fc03c8b17142c8f0f01c02fe77417, pass type pass.cam-mob.passbookpasstest, serial number 1; with web service url http://192.168.1.106/passesWebserver/webService/) got response with code 200
Response for Unregistering a device
Meaning
200 Disassociation succeeds
401 Request is not authorized.
26
5. Logging Errors
POST request to webServiceURL/version/log
Ex:
Generating POST request with URL <http:/192.168.1.106/passesWebserver/webService/v1/log
27
V. Digi Promo App
28
Digi Promo App- Detail
29
Digi Promo App- Search
30
Références
http://stackoverflow.com/
https://developer.apple.com/passbook/
https://developer.apple.com/library/ios/#documentation/PassKit/Reference/PassKit_WebService/WebService.html
VI. Démo