Class: Board::Client::UserOrganizations
- Inherits:
-
API
- Object
- API
- Board::Client::UserOrganizations
show all
- Defined in:
- lib/board/client/user_organizations.rb
Instance Method Summary
collapse
Methods inherited from API
#get, #initialize, #post
Instance Method Details
#create(attributes) ⇒ Object
12
13
14
15
16
17
|
# File 'lib/board/client/user_organizations.rb', line 12
def create(attributes)
user_id = attributes.fetch(:user_id)
organization_id = attributes.fetch(:organization_id)
post("/users/#{user_id}/organizations", :id => organization_id)
end
|
#list(attributes) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/board/client/user_organizations.rb', line 4
def list(attributes)
user_id = attributes.fetch(:user_id) {
raise ArgumentError, "user_id is required"
}
get("/users/#{user_id}/organizations")
end
|