Sha256: 225ac784a350dda32e10f77d5d6648df66eaede0644493f9153cdb594fccfbbf

Contents?: true

Size: 465 Bytes

Versions: 2

Compression:

Stored size: 465 Bytes

Contents

module Board
  class Client::UserOrganizations < Client::API

    def list(attributes)
      user_id = attributes.fetch(:user_id) {
        raise ArgumentError, "user_id is required"
      }

      get("/users/#{user_id}/organizations")
    end

    def create(attributes)
      user_id = attributes.fetch(:user_id)
      organization_id = attributes.fetch(:organization_id)

      post("/users/#{user_id}/organizations", :id => organization_id)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
board-client-0.99.1 lib/board/client/user_organizations.rb
board-client-0.99.0 lib/board/client/user_organizations.rb