This repository has been archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 378
Newsstand shelf JSON
Simbul edited this page Feb 25, 2013
·
13 revisions
To use Newsstand and make books/issues available for download in Baker 4.0 you need to put the shelf manifest, a JSON file on your server containing the list of the issues you want to make available. Note that this is not the same as the JSON file containing your book info (book/issue manifest).
To point Baker to the JSON file, set the NEWSSTAND_MANIFEST_URL
constant in Constants.h
to the URL of the manifest, e.g. http://example.com/shelf.json
.
[
{
"name": "a-study-in-scarlet",
"title": "A Study in Scarlet",
"info": "The original masterpiece by Sir A. Conan Doyle",
"date": "1887-10-10 10:10:10",
"cover": "http://bakerframework.com/newsstand-books/a-study-in-scarlet.png",
"url": "http://bakerframework.com/newsstand-books/a-study-in-scarlet.hpub",
"product_id": "com.example.Baker.issues.january2013"
},
{
"name": "a-study-in-green",
"title": "A Study in Green",
"info": "An exciting remake of the original, with added mint!",
"date": "2010-10-10 10:10:10",
"cover": "http://bakerframework.com/newsstand-books/a-study-in-green.png",
"url": "http://bakerframework.com/newsstand-books/a-study-in-green.hpub"
}
...
]
-
name ( string ):
A unique identifier for the issue. Note that both Newsstand and Baker rely on this ID, which should be unique and should never change. This property is used internally and it won't be shown to the user. -
title ( string ):
The title of your issue. This is what users will see in the shelf. It should generally match the title specified in your book.json. -
date ( string ):
The publication date for the issue, in the formatYYYY-MM-DD HH:MM:SS
. Note that issues in the shelf will be sorted according to the date (with the most recent ones on top). This property is used internally and it won't be shown to the user. -
cover ( string ):
The URL pointing to the cover for the selected issue. This is the cover that will be displayed in the shelf. The image should generally match the cover specified in your book.json (although note that the shelf cover will be stored on your server, while the book.json cover will be stored in the.hpub
file). For best results on iPad, the cover size should be 270x360px. -
url ( string ):
The URL pointing to the HPub file containing the issue. Baker will retrieve the issue from this URL every time a user decides to download it. -
info ( string , optional):
A short text that will be displayed below the title, in the shelf. It may be used to provide a summary of the content of an issue. -
product_id ( string, optional):
The product ID for a paid-for issue (from iTunes Connect).
Note that, when Newsstand is enabled, Baker will not display any of the bundled books. In fact, you can delete the books
folder from the Xcode project entirely.