guardian/frontend — pull request #4598 by janua (2014-06-06 14:44:27+00:00)
Title: Add DraftContentApi and LiveContentApi

I am working on preview/draft.

There is a need to call both the `Live` Content API and the `Draft` Content API (We have decided to call it `draft`). I have added two new objects for each of the Content API versions; `DraftContentApi` and `LiveContentApi`.

Throughout the project, `LiveContentApi` is used. `DraftContentApi` will be used by `facia-tool` only.

The `Preview` project will use `LiveContentApi`, but we will point this to the `draft` Content API, as this is just a shell project and uses all the code from the other projects.

### Logic

#### Draft Content API
For `DraftContentApi` we use `content.api.draft.host` if it is set. If not, we use `content.api.live.host`.

#### Live Content API
For `LiveContentApi` we use `content.api.live.host` if it is set. If not, we use the default `http://content.guardianapis.com`.

#### Other small changes
I took this opportunity to refactor to remove `getMandatoryStringProperty` from `contentApi` `object` in `GuardianConfiguration`.
This means that all the following properties use `Option[String/Int]`:
- `content.api.key`
- `content.api.live.host`
- `content.api.draft.host`

`content.api.key` was the biggest change, as we don't want to provide an empty `api-key` query parameter in places (`Admin`), so I have also changed the usages of this.

@gklopper