Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish page #78

Merged
merged 3 commits into from
Jun 24, 2015
Merged

Publish page #78

merged 3 commits into from
Jun 24, 2015

Conversation

TakenPilot
Copy link
Contributor

When PUTing http://localhost.vulture.com:3001/pages/1@published this information:

{
    "layout": "/components/nym2015-layout/instances/article",
    "main": "/components/story/instances/vulture-first"
}

then we receive:

{
    "layout": "/components/nym2015-layout/instances/article@published",
    "main": "/components/story/instances/vulture-first@published"
}

and GETting http://localhost.vulture.com:3001/pages/1@published returns:

{
    "layout": "/components/nym2015-layout/instances/article@published",
    "main": "/components/story/instances/vulture-first@published"
}

and GETing /components/story/instances/vulture-first returns:

{
  "headline": {
    "required": {
      "social": "This is the first vulture story",
      "short": "First vulture story"
    },
    "optional": {
      "seo": "",
      "long": ""
    }
  },
  "authors": [
    {
      "name": "Nelson Pecra",
      "twitter": "yoshokatana"
    }
  ],
  "date": "2015-04-30T16:20:00.000Z",
  "excerpt": "Nothing much to see here, folks.\n",
  "emphasis": "",
  "sponsored": "",
  "img": null,
  "rubric": null,
  "channel": null,
  "share": null,
  "tags": {
    "_ref": "/components/tags/instances/0"
  },
  "content": [
    {
      "_ref": "/components/paragraph/instances/0"
    },
    {
      "_ref": "/components/image/instances/0"
    },
    {
      "_ref": "/components/paragraph/instances/1"
    },
    {
      "_ref": "/components/paragraph/instances/2"
    },
    {
      "_ref": "/components/paragraph/instances/4"
    }
  ],
  "sources": [
    {
      "name": "New York Times",
      "url": "http://nytimes.com/404",
      "title": "A Mote in Gods Eye"
    }
  ]
}

and GETing http://localhost.vulture.com:3001/components/story/instances/vulture-first@published returns:

{
  "headline": {
    "required": {
      "social": "This is the first vulture story",
      "short": "First vulture story"
    },
    "optional": {
      "seo": "",
      "long": ""
    }
  },
  "authors": [
    {
      "name": "Nelson Pecra",
      "twitter": "yoshokatana"
    }
  ],
  "date": "2015-04-30T16:20:00.000Z",
  "excerpt": "Nothing much to see here, folks.\n",
  "emphasis": "",
  "sponsored": "",
  "img": null,
  "rubric": null,
  "channel": null,
  "share": null,
  "tags": {
    "_ref": "/components/tags/instances/0@published"
  },
  "content": [
    {
      "_ref": "/components/paragraph/instances/0@published"
    },
    {
      "_ref": "/components/image/instances/0@published"
    },
    {
      "_ref": "/components/paragraph/instances/1@published"
    },
    {
      "_ref": "/components/paragraph/instances/2@published"
    },
    {
      "_ref": "/components/paragraph/instances/4@published"
    }
  ],
  "sources": [
    {
      "name": "New York Times",
      "url": "http://nytimes.com/404",
      "title": "A Mote in Gods Eye"
    }
  ]
}

and all the components referred to within are also published, etc etc.

@nelsonpecora
Copy link
Contributor

👍 shiny

@cruzanmo
Copy link

Looks good.

TakenPilot added a commit that referenced this pull request Jun 24, 2015
@TakenPilot TakenPilot merged commit 60c331e into master Jun 24, 2015
@TakenPilot TakenPilot deleted the publish-page branch June 24, 2015 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants