module PlanethosterApi
Constants
- VERSION
Attributes
configuration[W]
Public Class Methods
configuration()
click to toggle source
# File lib/planethoster_api.rb, line 12 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
# File lib/planethoster_api.rb, line 20 def self.configure yield(configuration) end
domain()
click to toggle source
# File lib/planethoster_api.rb, line 24 def self.domain creds_wrap do PlanethosterApi::Domain.new( @configuration.api_user, @configuration.api_key ) end end
reset()
click to toggle source
# File lib/planethoster_api.rb, line 16 def self.reset @configuration = Configuration.new end
world()
click to toggle source
# File lib/planethoster_api.rb, line 33 def self.world creds_wrap do PlanethosterApi::World.new( @configuration.api_user, @configuration.api_key ) end end
Private Class Methods
creds_wrap() { || ... }
click to toggle source
# File lib/planethoster_api.rb, line 43 def self.creds_wrap if @configuration.nil? raise "api_key and api_user are not defined - Please refer to documentation and configure credentials: https://github.com/PlanetHoster/planethoster-ruby" end yield end