Module: Worksection::Client::Creating

Included in:
Worksection::Client
Defined in:
lib/worksection/modules/creating.rb

Instance Method Summary collapse

Instance Method Details

#add_user(**args) ⇒ Object



49
50
51
52
53
54
# File 'lib/worksection/modules/creating.rb', line 49

def add_user(**args)
  url = URI("https://#{@domain}/api/admin/?action=add_user"\
            "#{collect_params(**args)}"\
            "&hash=#{to_md5(__method__.to_s)}")
  perform_request(url)
end

#post_comment(project_id, task_id, **args) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/worksection/modules/creating.rb', line 5

def post_comment(project_id, task_id, **args)
  page = "/project/#{project_id}/#{task_id}/"
  url = URI("https://#{@domain}/api/admin/?action=post_comment&page=#{page}"\
            "#{collect_params(**args)}"\
            "&hash=#{to_md5(__method__.to_s, page)}")
  perform_request(url)
end

#post_project(**args) ⇒ Object

your-domain.com/api/admin/?action=post_project&email_user_from=USER_EMAIL&email_manager=USER_EMAIL&email_user_to=USER_EMAIL&members=USER_EMAIL, USER_EMAIL&title=TASK_NAME&text=TASK_TEXT&company=COMPANY&datestart=DD.MM.YYYYY&dateend=DD.MM.YYYYY&hash=HASH



14
15
16
17
18
19
# File 'lib/worksection/modules/creating.rb', line 14

def post_project(**args)
  url = URI("https://#{@domain}/api/admin/?action=post_project"\
            "#{collect_params(**args)}"\
            "&hash=#{to_md5(__method__.to_s, page)}")
  perform_request(url)
end

#post_subtask(project_id, task_id, **args) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/worksection/modules/creating.rb', line 31

def post_subtask(project_id, task_id, **args)
  page = "/project/#{project_id}/#{task_id}/"
  url = URI("https://#{@domain}/api/admin/?action=post_subtask&page=#{page}"\
            "#{collect_params(**args)}"\
            "&hash=#{to_md5(__method__.to_s, page)}")
  perform_request(url)
end

#post_task(project_id, **args) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/worksection/modules/creating.rb', line 22

def post_task(project_id, **args)
  page = "/project/#{project_id}/"
  url = URI("https://#{@domain}/api/admin/?action=post_task&page=#{page}"\
            "#{collect_params(**args)}"\
            "&hash=#{to_md5(__method__.to_s, page)}")
  perform_request(url)
end

#post_timemoney(project_id, task_id, subtask_id, **args) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/worksection/modules/creating.rb', line 40

def post_timemoney(project_id, task_id, subtask_id, **args)
  page = "/project/#{project_id}/#{task_id}/#{subtask_id}/"
  url = URI("https://#{@domain}/api/admin/?action=post_timemoney&page=#{page}"\
            "#{collect_params(**args)}"\
            "&hash=#{to_md5(__method__.to_s, page)}")
  perform_request(url)
end