Class: Board::Client
- Inherits:
-
Object
- Object
- Board::Client
- 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)
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)
Class.new(Error)
- VERSION =
'0.99.1'
Class Attribute Summary collapse
-
.default_endpoint ⇒ Object
Returns the value of attribute default_endpoint.
Instance Method Summary collapse
- #candidates ⇒ Object
-
#initialize(api_key, options = {}) ⇒ Client
constructor
A new instance of Client.
- #organizations ⇒ Object
- #user_organizations ⇒ Object
- #users ⇒ Object
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, = {}) @api_key = api_key @endpoint = [:endpoint] || Client.default_endpoint @ssl = [:ssl] || {} end |
Class Attribute Details
.default_endpoint ⇒ Object
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
#candidates ⇒ Object
53 54 55 |
# File 'lib/board/client.rb', line 53 def candidates Candidates.new(self) end |
#organizations ⇒ Object
57 58 59 |
# File 'lib/board/client.rb', line 57 def organizations Organizations.new(self) end |
#user_organizations ⇒ Object
61 62 63 |
# File 'lib/board/client.rb', line 61 def user_organizations UserOrganizations.new(self) end |