Module: Berkshelf::APIClient

Defined in:
lib/berkshelf/api_client.rb,
lib/berkshelf/api_client/errors.rb,
lib/berkshelf/api_client/version.rb,
lib/berkshelf/api_client/connection.rb,
lib/berkshelf/api_client/remote_cookbook.rb,
lib/berkshelf/api_client/chef_server_connection.rb

Overview

Used to communicate with a remotely hosted [Berkshelf API Server](github.com/berkshelf/berkshelf-api).

Examples:

client = Berkshelf::APIClient.new("https://api.berkshelf.com")
client.universe #=> [...]

Defined Under Namespace

Classes: BadResponse, ChefServerConnection, Connection, RemoteCookbook, ServiceNotFound, ServiceUnavailable, TimeoutError

Constant Summary collapse

VERSION =
"4.0.1".freeze

Class Method Summary collapse

Class Method Details

.chef_server(**args) ⇒ Object



19
20
21
# File 'lib/berkshelf/api_client.rb', line 19

def chef_server(**args)
  ChefServerConnection.new(**args)
end

.new(*args) ⇒ Object



15
16
17
# File 'lib/berkshelf/api_client.rb', line 15

def new(*args)
  Connection.new(*args)
end