Module: Koha::User

Included in:
Client
Defined in:
lib/koha/api_methods/user.rb

Instance Method Summary collapse

Instance Method Details

#all_users(opts = {}) ⇒ Object

get all the users

Parameters:

  • opts (Hash) (defaults to: {})

    standard opts hash to pass to http client



6
7
8
# File 'lib/koha/api_methods/user.rb', line 6

def all_users opts= {}
  JSON.parse(get "user/all", opts )
end

#delete_hold(opts = {}) ⇒ Object



23
24
25
26
27
28
# File 'lib/koha/api_methods/user.rb', line 23

def delete_hold opts= {}
  opts[:evaluate] ||= "canceled"
  opts[:prefix] = opts[:biblionumber] ? "biblio" : "item" #delete end-point is like :/user/byid/544/holds/biblio/1
  path, opts = build_user_path("holds", opts)
  return  delete(path, opts)
end

#renew_issue(opts = {}) ⇒ Object



35
36
37
38
# File 'lib/koha/api_methods/user.rb', line 35

def renew_issue opts={}
  path, opts = build_user_path("issues", opts)
  JSON.parse(put path, opts)
end

#today_users(opts = {}) ⇒ Object

get all today’s users

Parameters:

  • opts (Hash) (defaults to: {})

    standard opts hash to pass to http client



12
13
14
# File 'lib/koha/api_methods/user.rb', line 12

def today_users opts= {}
  JSON.parse(get "user/today", opts)
end

#user_holds(opts = {}) ⇒ Object

get all today’s users

Parameters:

  • opts (Hash) (defaults to: {})

    standard opts hash to pass to http client



18
19
20
21
# File 'lib/koha/api_methods/user.rb', line 18

def user_holds opts= {}
  path, opts = build_user_path("holds", opts)
  JSON.parse(get path, opts)
end

#user_issues(opts = {}) ⇒ Object



30
31
32
33
# File 'lib/koha/api_methods/user.rb', line 30

def user_issues opts= {}
  path, opts = build_user_path("issues", opts)
  JSON.parse(get path, opts)
end