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:



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

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
# File 'lib/octokit/client/pages.rb', line 26

def pages_build(repo, id, options = {})
  get "#{Repository.path repo}/pages/builds/#{id}", options
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:



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

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:



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

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