Module: RedmineAPIHelper::AttachmentsAPIHelper

Included in:
Helpers
Defined in:
lib/redmine_api_helper/attachments_api_helper.rb

Instance Method Summary collapse

Instance Method Details

#attachment_url(id, **params) ⇒ Object

creates an attachment_url from args



26
27
28
# File 'lib/redmine_api_helper/attachments_api_helper.rb', line 26

def attachment_url(id, **params)
  url_path(args.urls.Home, "attachments", id, params)
end

#destroy_attachment(id, **params) ⇒ Object

deletes an existing attachment with params, corresponds to controller#destroy



47
48
49
# File 'lib/redmine_api_helper/attachments_api_helper.rb', line 47

def destroy_attachment(id, **params)
  destroy_object(:attachment, id, params)
end

#read_attachment(id, **params) ⇒ Object

reads attachment having id, corresponds to controller#show



33
34
35
# File 'lib/redmine_api_helper/attachments_api_helper.rb', line 33

def read_attachment(id, **params)
  read_object(:attachment, id, params)
end

#update_attachment(id, **params) ⇒ Object

updates an existing attachment with params, corresponds to controller#update



40
41
42
# File 'lib/redmine_api_helper/attachments_api_helper.rb', line 40

def update_attachment(id, **params)
  update_object(:attachment, id, params)
end