Sha256: cc56fcfd0d7d4c55367df4a41932f530e7cde477b7485078d8ea13c054e0e294
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require 'kegbot_api/client_helpers' require 'kegbot_api/nouns/keg' require 'kegbot_api/nouns/tap' require 'kegbot_api/nouns/drink' require 'kegbot_api/nouns/session' require 'kegbot_api/nouns/beverage' require 'kegbot_api/nouns/image' require 'kegbot_api/nouns/keg_size' module KegbotApi # Represents a connection to a specific Kegbot REST server # # Because a program my want to access multiple Kegbot REST APIs servers from the same program, you can create a {Client} # instance appropriate for each server. To get an instance of a REST noun ({Drink}, {Keg}, {Tap}, etc.) connected to # this client, use the appropriate methods below. {#Drink} class Client include ClientHelpers attr_accessor :base_url # @param base_url [String] base URL for the REST server (ie: http://demo.kegbot.org/api) # @param options [Hash] (currently unused) def initialize(base_url, options = {}) self.base_url = base_url end # @!macro [attach] rest_noun # @!method $1 # @return [$1] $1 class (specialized for this specific client instance) noun Drink noun Tap noun Keg noun Session noun Session noun Beverage noun Image noun KegSize end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kegbot_api-0.0.1 | lib/kegbot_api/client.rb |