Class: Roistat::Resources::Access

Inherits:
Base
  • Object
show all
Defined in:
lib/roistat/resources/access.rb,
sig/roistat.rbs

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Roistat::Resources::Base

Instance Method Details

#authorized_users(method: :get) ⇒ Object

GET|POST /project/access/get-authorized-users — help-en.

Parameters:

  • method: (Symbol) (defaults to: :get)

Returns:

  • (Object)


10
11
12
13
14
15
16
17
18
19
# File 'lib/roistat/resources/access.rb', line 10

def authorized_users(method: :get)
  case method.to_sym
  when :get
    client.get("project/access/get-authorized-users")
  when :post
    client.post("project/access/get-authorized-users")
  else
    raise ArgumentError, "method must be :get or :post"
  end
end

#change(**body) ⇒ Object

POST /project/access/change — help-en.

Parameters:

  • (Object)

Returns:

  • (Object)


22
23
24
# File 'lib/roistat/resources/access.rb', line 22

def change(**body)
  client.post("project/access/change", body: body)
end

#user_listObject

GET /project/permissions/user/list — help-ru.

Returns:

  • (Object)


5
6
7
# File 'lib/roistat/resources/access.rb', line 5

def user_list
  client.get("project/permissions/user/list")
end