Class: Plagscan::Users
- Inherits:
-
Object
- Object
- Plagscan::Users
- Defined in:
- lib/plagscan/users.rb
Overview
PlagScan users API
Class Method Summary collapse
-
.get(access_token:, user_id:) ⇒ Hash
User get REST API For more details, see api.plagscan.com/v3docs/#api-User-GetUser.
-
.list(access_token:, **options) ⇒ Array
User get REST API For more details, see api.plagscan.com/v3docs/#api-User-ListUser.
Class Method Details
.get(access_token:, user_id:) ⇒ Hash
User get REST API For more details, see api.plagscan.com/v3docs/#api-User-GetUser
32 33 34 35 36 37 |
# File 'lib/plagscan/users.rb', line 32 def self.get(access_token:, user_id:) Plagscan::Request.json_request( "users/#{user_id}", access_token: access_token )&.[](:data) end |
.list(access_token:, **options) ⇒ Array
User get REST API For more details, see api.plagscan.com/v3docs/#api-User-ListUser
16 17 18 19 20 21 22 23 |
# File 'lib/plagscan/users.rb', line 16 def self.list(access_token:, **) list_props = .delete_if { |k, _| !%i[start limit].include? k } Plagscan::Request.json_request( 'users', access_token: access_token, body: list_props )&.[](:data) end |