Module: Octokit::Client::Pages

Included in:
Octokit::Client
Defined in:
lib/octokit/client/pages.rb

Overview

Methods for the Pages API

Instance Method Summary collapse

Instance Method Details

#latest_pages_build(repo, options = {}) ⇒ Object

List the latest Pages build information for a repository

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

  • Sawyer::Resource A GitHub Pages resource about a build

See Also:


46
47
48
# File 'lib/octokit/client/pages.rb', line 46

def latest_pages_build(repo, options = {})
  get "#{Repository.path repo}/pages/builds/latest", options
end

#pages(repo, options = {}) ⇒ Object

List Pages information for a repository

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

  • Sawyer::Resource A GitHub Pages resource

See Also:


14
15
16
# File 'lib/octokit/client/pages.rb', line 14

def pages(repo, options = {})
  get "#{Repository.path repo}/pages", options
end

#pages_build(repo, id, options = {}) ⇒ Sawyer::Resource

Get a specific Pages build by ID

Examples:

Octokit.pages_build("github/developer.github.com", 5472601)

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • id (Integer, String)

    Build ID

Returns:

  • (Sawyer::Resource)

    Pages build information

See Also:


26
27
28
29
# File 'lib/octokit/client/pages.rb', line 26

def pages_build(repo, id, options = {})
  opts = ensure_api_media_type(:pages, options)
  get "#{Repository.path repo}/pages/builds/#{id}", opts
end

#pages_builds(repo, options = {}) ⇒ Array<Sawyer::Resource> Also known as: list_pages_builds

List Pages builds for a repository

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

  • (Array<Sawyer::Resource>)

    A list of build history for a repository.

See Also:


36
37
38
# File 'lib/octokit/client/pages.rb', line 36

def pages_builds(repo, options = {})
  get "#{Repository.path repo}/pages/builds", options
end

#request_page_build(repo, options = {}) ⇒ Sawyer::Resource

Request a page build for the latest revision of the default branch

You can only request builds for your repositories

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

  • (Sawyer::Resource)

    Request result

See Also:


57
58
59
60
# File 'lib/octokit/client/pages.rb', line 57

def request_page_build(repo, options = {})
  opts = ensure_api_media_type(:pages, options)
  post "#{Repository.path repo}/pages/builds", opts
end