./README.md in rack-passbook-0.2.0 vs ./README.md in rack-passbook-0.3.0

- old
+ new

@@ -1,53 +1,62 @@ -![Passbook](http://cl.ly/JPjc/title_passbook.png) - # Rack::Passbook -[Passbook](http://www.apple.com/ios/whats-new/#passbook) is an iOS 6 feature that manages boarding passes, movie tickets, retail coupons, & loyalty cards. Using the [PassKit API](https://developer.apple.com/library/prerelease/ios/#documentation/UserExperience/Reference/PassKit_Framework/_index.html), developers can register web services to automatically update content on the pass, such as gate changes on a boarding pass, or adding credit to a loyalty card. +[Passbook](https://www.apple.com/ios/whats-new/#passbook) +manages boarding passes, movie tickets, retail coupons, & loyalty cards. Using the [PassKit API](https://developer.apple.com/documentation/passkit), +developers can register web services to automatically update content on the pass, +such as gate changes on a boarding pass +or adding credit to a loyalty card. -Apple [provides a specification](https://developer.apple.com/library/prerelease/ios/#documentation/PassKit/Reference/PassKit_WebService/WebService.html) for a REST-style web service protocol to communicate with Passbook, with endpoints to get the latest version of a pass, register / unregister devices to receive push notifications for a pass, and query for passes registered for a device. +Apple [provides a specification](https://developer.apple.com/library/prerelease/ios/#documentation/PassKit/Reference/PassKit_WebService/WebService.html) +for a REST-style web service protocol to communicate with Passbook, +with endpoints to get the latest version of a pass, +register / unregister devices to receive push notifications for a pass, +and query for passes registered for a device. Rack::Passbook provides those specified endpoints. -> If you're just starting out Passbook development, you should definitely check out [this great two-part tutorial](http://www.raywenderlich.com/20734/beginning-passbook-part-1) by [Marin Todorov](http://www.raywenderlich.com/about#marintodorov) ([Part 1](http://www.raywenderlich.com/20734/beginning-passbook-part-1) [Part 2](http://www.raywenderlich.com/20785/beginning-passbook-in-ios-6-part-22)). +## Requirements +- Ruby 1.9 or higher +- PostgreSQL 9.1 or higher + ## Installation +### Gemfile + +```ruby +gem 'rack-passbook', require: 'rack/passbook' ``` -$ gem install rack-passbook -``` -## Requirements - -- Ruby 1.9 -- PostgreSQL 9.1 running locally ([Postgres.app](http://postgresapp.com) is the easiest way to get a Postgres server running on your Mac) - ## Example Usage -Rack::Passbook can be run as Rack middleware or as a single web application. All that is required is a connection to a Postgres database. +Rack::Passbook can be run as Rack middleware or as a single web application. +All that's required is a connection to a Postgres database. +An example application can be found in the `/example` directory of this repository. + ### config.ru ```ruby require 'bundler' Bundler.require run Rack::Passbook ``` -An example application can be found in the `/example` directory of this repository. - --- ## Specification -What follows is a summary of the specification. The complete specification can be found in the [Passbook Web Service Reference](https://developer.apple.com/library/prerelease/ios/#documentation/PassKit/Reference/PassKit_WebService/WebService.html). +What follows is a summary of the specification. +The complete specification can be found in the +[Passbook Web Service Reference](https://developer.apple.com/library/prerelease/ios/#documentation/PassKit/Reference/PassKit_WebService/WebService.html). ### Getting the Latest Version of a Pass ``` -GET http://example.com/v1/passes/:passTypeIdentifier/:serialNumber +GET https://example.com/v1/passes/:passTypeIdentifier/:serialNumber ``` - **passTypeIdentifier** The pass’s type, as specified in the pass. - **serialNumber** The unique pass identifier, as specified in the pass. @@ -58,11 +67,11 @@ - Otherwise, return the appropriate standard HTTP status. ### Getting the Serial Numbers for Passes Associated with a Device ``` -GET http://example.com/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier[?passesUpdatedSince=tag] +GET https://example.com/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier[?passesUpdatedSince=tag] ``` - **deviceLibraryIdentifier** A unique identifier that is used to identify and authenticate the device. - **passTypeIdentifier** The pass’s type, as specified in the pass. - **serialNumber** The unique pass identifier, as specified in the pass. @@ -71,19 +80,19 @@ **Response** If the `passesUpdatedSince` parameter is present, return only the passes that have been updated since the time indicated by tag. Otherwise, return all passes. - If there are matching passes, return HTTP status 200 with a JSON dictionary with the following keys and values: - - **lastUpdated** _(string)_ The current modification tag. - - **serialNumbers** _(array of strings)_ The serial numbers of the matching passes. + - **lastUpdated** _(string)_ The current modification tag. + - **serialNumbers** _(array of strings)_ The serial numbers of the matching passes. - If there are no matching passes, return HTTP status 204. - Otherwise, return the appropriate standard HTTP status. ### Registering a Device to Receive Push Notifications for a Pass ``` -POST http://example.com/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber +POST https://example.com/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber ``` - **deviceLibraryIdentifier** A unique identifier that is used to identify and authenticate the device. - **passTypeIdentifier** The pass’s type, as specified in the pass. - **serialNumber** The unique pass identifier, as specified in the pass. @@ -100,11 +109,11 @@ - Otherwise, return the appropriate standard HTTP status. ### Unregistering a Device ``` -DELETE http://example.com/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber +DELETE https://example.com/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber ``` - **deviceLibraryIdentifier** A unique identifier that is used to identify and authenticate the device. - **passTypeIdentifier** The pass’s type, as specified in the pass. - **serialNumber** The unique pass identifier, as specified in the pass. @@ -117,14 +126,11 @@ --- ## Contact -Mattt Thompson +[Mattt](https://twitter.com/mattt) -- http://github.com/mattt -- http://twitter.com/mattt -- m@mattt.me - ## License -Rack::Passbook is available under the MIT license. See the LICENSE file for more info. +Rack::Passbook is available under the MIT license. +See the LICENSE file for more info.