Class: Board::Client

Inherits:
Object
  • Object
show all
Includes:
Request
Defined in:
lib/board/client.rb,
lib/board/client/version.rb

Defined Under Namespace

Modules: Request Classes: API, Candidates, Error, Organizations, UserOrganizations, Users

Constant Summary collapse

BadRequest =
Class.new(Error)
Unauthorized =
Class.new(Error)
Forbidden =
Class.new(Error)
NotFound =
Class.new(Error)
NotAcceptable =
Class.new(Error)
Conflict =
Class.new(Error)
UnprocessableEntity =
Class.new(Error)
InternalServerError =
Class.new(Error)
NotImplemented =
Class.new(Error)
BadGateway =
Class.new(Error)
ServiceUnavailable =
Class.new(Error)
VERSION =
'0.99.1'

Class Attribute Summary collapse

Instance Method Summary collapse

Methods included from Request

#get, #hash_to_query_string, #post, #request

Constructor Details

#initialize(api_key, options = {}) ⇒ Client

Returns a new instance of Client.



37
38
39
40
41
# File 'lib/board/client.rb', line 37

def initialize(api_key, options = {})
  @api_key  = api_key
  @endpoint = options[:endpoint] || Client.default_endpoint
  @ssl      = options[:ssl] || {}
end

Class Attribute Details

.default_endpointObject

Returns the value of attribute default_endpoint.



33
34
35
# File 'lib/board/client.rb', line 33

def default_endpoint
  @default_endpoint
end

Instance Method Details

#candidatesObject



53
54
55
# File 'lib/board/client.rb', line 53

def candidates
  Candidates.new(self)
end

#organizationsObject



57
58
59
# File 'lib/board/client.rb', line 57

def organizations
  Organizations.new(self)
end

#user_organizationsObject



61
62
63
# File 'lib/board/client.rb', line 61

def user_organizations
  UserOrganizations.new(self)
end

#usersObject



49
50
51
# File 'lib/board/client.rb', line 49

def users
  Users.new(self)
end