module PhoneGap::Build

Constants

VERSION

Public Class Methods

apps() click to toggle source
# File lib/phone_gap/build.rb, line 21
def self.apps
  if credentials?
    http_response = HTTParty.get("https://build.phonegap.com/api/v1/apps?auth_token=#{@credentials.token}")
    parsed_response = JSON.parse(http_response.body)
    AppFactory.create_many(parsed_response)
  else
    Error.new(message: 'Api credentials not found. Set them or add thmem to config/phonegap.yml')
  end
end
credentials(credentials) click to toggle source
# File lib/phone_gap/build.rb, line 17
def self.credentials(credentials)
  @credentials = Credentials.instance.set(credentials)
end
credentials?() click to toggle source
# File lib/phone_gap/build.rb, line 31
def self.credentials?
  if @credentials && @credentials.token
    true
  else
    Credentials.instance.load
  end
end