class Github::Client::Repos::Pages

The Pages API retrieves information about your GitHub 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.

Public Instance Methods

all(*args)
Alias for: list
find(*args)
Alias for: get
get(*args) click to toggle source

Get information about a Pages site

@example

github = Github.new
github.repos.pages.get owner: 'owner-name', repo: 'repo-name'

@api public

# File lib/github_api/client/repos/pages.rb, line 41
def get(*args)
  arguments(args, required: [:owner, :repo])

  get_request("/repos/#{arguments.owner}/#{arguments.repo}/pages", arguments.params)
end
Also aliased as: find
list(*args) { |el| ... } click to toggle source

List Pages builds

@example

github = Github.new
github.repos.pages.list owner: 'owner-name', repo: 'repo-name'

github = Github.new
github.repos.pages.list :latest, owner: 'owner-name', repo: 'repo-name'

@api public

# File lib/github_api/client/repos/pages.rb, line 21
def list(*args)
  arguments(args, required: [:owner, :repo])

  response = if args.map(&:to_s).include?('latest')
    get_request("/repos/#{arguments.owner}/#{arguments.repo}/pages/builds/latest", arguments.params)
  else
    get_request("/repos/#{arguments.owner}/#{arguments.repo}/pages/builds", arguments.params)
  end
  return response unless block_given?
  response.each { |el| yield el }
end
Also aliased as: all