123456789_123456789_123456789_123456789_123456789_

Module: Octokit::Client::Pages

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/client/pages.rb

Overview

Methods for the Pages API

Instance Method Summary

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:

[ GitHub ]

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

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

#list_pages_builds(repo, options = {})

Alias for #pages_builds.

[ GitHub ]

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

alias list_pages_builds pages_builds

#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:

[ GitHub ]

  
# 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:

[ GitHub ]

  
# 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:

[ GitHub ]

  
# 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:

[ GitHub ]

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

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