module Octokit::Client::Marketplace

Methods for the Marketplace Listing API

@see developer.github.com/v3/apps/marketplace/

Public Instance Methods

list_accounts_for_plan(plan_id, options = {}) click to toggle source

List all GitHub accounts on a specific plan

@param plan_id [Integer] The id of the GitHub plan @param options [Hash] A customizable set of options

@see developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan

@return [Array<Sawyer::Resource>] A list of accounts

# File lib/octokit/client/marketplace.rb, line 28
def list_accounts_for_plan(plan_id, options = {})
  paginate "/marketplace_listing/plans/#{plan_id}/accounts", options
end
list_plans(options = {}) click to toggle source

List all plans for an app's marketplace listing

@param options [Hash] A customizable set of options

@see developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing

@return [Array<Sawyer::Resource>] A list of plans

# File lib/octokit/client/marketplace.rb, line 16
def list_plans(options = {})
  paginate "/marketplace_listing/plans", options
end
marketplace_purchases(options = {}) click to toggle source

Get user's Marketplace purchases

@param options [Hash] A customizable set of options

@see developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases

@return [Array<Sawyer::Resource>] A list of Marketplace purchases

# File lib/octokit/client/marketplace.rb, line 51
def marketplace_purchases(options = {})
  get "/user/marketplace_purchases", options
end
plan_for_account(account_id, options = {}) click to toggle source

Get the plan associated with a given GitHub account

@param account_id [Integer] The id of the GitHub account @param options [Hash] A customizable set of options

@see developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing

@return <Sawyer::Resource> Account with plan details, or nil

# File lib/octokit/client/marketplace.rb, line 40
def plan_for_account(account_id, options = {})
  get "/marketplace_listing/accounts/#{account_id}", options
end