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 46

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 39

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 = {})
  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:

[ GitHub ]

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

[ GitHub ]

  
# 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