Connexions/cnx-archive — pull request #92 by karenc (2013-10-21 13:23:46+00:00)
Title: History info and extra metadata API

- Only return history information up to the displayed version

This means that when you go to http://localhost:6543/contents/e79ffde3-7fb4-4af3-9ec8-df648b391597@1.7, you will see 1.6 and 1.7 in history
```
"history": [
{
"changes": "New version 1.7",
"version": "1.7",
"revised": "2013-08-31 21:07:20.342798+02",
"publisher": {"website": null, "surname": null, "suffix": null, "firstname": "OpenStax College", "title": null, "othername": null, "email": "info@openstaxcollege.org", "fullname": "OpenStax College", "id": "e5a07af6-09b9-4b74-aa7a-b7510bee90b8"}
},
{
"changes": "Updated something",
"version": "1.6",
"revised": "2013-07-31 21:07:20.342798+02",
"publisher": {"website": null, "surname": null, "suffix": null, "firstname": "OpenStax College", "title": null, "othername": null, "email": "info@openstaxcollege.org", "fullname": "OpenStax College", "id": "e5a07af6-09b9-4b74-aa7a-b7510bee90b8"}
}
]
```

But when you go to http://raring:6543/contents/e79ffde3-7fb4-4af3-9ec8-df648b391597@1.6, you will only see 1.6 in history

```
"history": [
{
"changes": "Updated something",
"version": "1.6",
"revised": "2013-07-31 21:07:20.342798+02",
"publisher": {"website": null, "surname": null, "suffix": null, "firstname": "OpenStax College", "title": null, "othername": null, "email": "info@openstaxcollege.org", "fullname": "OpenStax College", "id": "e5a07af6-09b9-4b74-aa7a-b7510bee90b8"}
}
]
```

- Move downloads information into extra API
- Add is_latest flag to the extra API

Instead of having a separate API for just the download, I'm creating an "extra" API for getting information about a collection or module that can change after it is published.

So if you go to http://raring:6543/extra/e79ffde3-7fb4-4af3-9ec8-df648b391597@1.7, you'll get the downloads and the is latest flag:

```
{
"downloads": [
{
"path": "/exports/e79ffde3-7fb4-4af3-9ec8-df648b391597@1.7.pdf",
"filename": "college-physics.pdf",
"details": "PDF file, for viewing content offline and printing.",
"format": "PDF"
}, {
"path": "/exports/e79ffde3-7fb4-4af3-9ec8-df648b391597@1.7.epub",
"filename": "college-physics.epub",
"details": "Electronic book format file, for viewing on mobile devices.",
"format": "EPUB"
}, {
"path": "/exports/e79ffde3-7fb4-4af3-9ec8-df648b391597@1.7.zip",
"filename": "college-physics.zip",
"details": "An offline HTML copy of the content. Also includes XML, included media files, and other support files.",
"format": "Offline ZIP"}],
"is_latest": true}
```