worksection-ruby 0.0.401 → 0.0.402

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a30c264035a6e6ce3666c9c0d9adda6504e51e6a10b00aa7f31f229ec27e9ad1
4
- data.tar.gz: 4d98417e027e00e960d2f9539eafc167a7aceafdfce48ce0f8a208d0be6112a0
3
+ metadata.gz: af53898cf916d24b6a6747a0714e443643d30a68c3c16410f2e7a63cff5560c9
4
+ data.tar.gz: 4e06a0fe9a8d3db856a55971c3a4d38b46ee860767594e8b17c01df3046494af
5
5
  SHA512:
6
- metadata.gz: 1d9c0571ad91c55fe60809993a3bdf6bac82643504f269700680c7efa515bee764550dcf0daca6f1bbe93daa266e4b86282bae19090751db29934b181d8d2996
7
- data.tar.gz: 9762e28b5799861f1594f7166fbebd91d57a61630af6ab8c2141a470b2ac72926d808231500b3728e08e42054f17b237bbf76fc74c0ed7aa973b5c0a86ac8f54
6
+ metadata.gz: d05c3e7c2ea97f8b0a83d3c417436039058f70d2fabd7c8972a41bba62ac0aa909ae00ec3500fd5282e9f31784650382e4a7fb7d52b9d139edfb6cdb6a778e2f
7
+ data.tar.gz: f9cb77046fc76adb316c6c2a108d790ce42a2cfd35055009dfdf90a5abf5d53da13e322cf35498abe2450321566a87dd599bb50144f8e389738db2be4fd39be3
data/.gitignore CHANGED
@@ -1,11 +1,59 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
1
+
2
+ # Created by https://www.gitignore.io/api/ruby
3
+ # Edit at https://www.gitignore.io/?templates=ruby
4
+
5
+ ### Ruby ###
6
+ *.gem
7
+ *.rbc
8
+ /.config
4
9
  /coverage/
5
- /doc/
10
+ /InstalledFiles
6
11
  /pkg/
7
12
  /spec/reports/
13
+ /spec/examples.txt
14
+ /test/tmp/
15
+ /test/version_tmp/
8
16
  /tmp/
9
17
 
10
- # rspec failure tracking
11
- .rspec_status
18
+ # Used by dotenv library to load environment variables.
19
+ # .env
20
+
21
+ # Ignore Byebug command history file.
22
+ .byebug_history
23
+
24
+ ## Specific to RubyMotion:
25
+ .dat*
26
+ .repl_history
27
+ build/
28
+ *.bridgesupport
29
+ build-iPhoneOS/
30
+ build-iPhoneSimulator/
31
+
32
+ ## Specific to RubyMotion (use of CocoaPods):
33
+ #
34
+ # We recommend against adding the Pods directory to your .gitignore. However
35
+ # you should judge for yourself, the pros and cons are mentioned at:
36
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
37
+ # vendor/Pods/
38
+
39
+ ## Documentation cache and generated files:
40
+ /.yardoc/
41
+ /_yardoc/
42
+ /doc/
43
+ /rdoc/
44
+
45
+ ## Environment normalization:
46
+ /.bundle/
47
+ /vendor/bundle
48
+ /lib/bundler/man/
49
+
50
+ # for a library or gem, you might want to ignore these files since the code is
51
+ # intended to run in multiple environments; otherwise, check them in:
52
+ # Gemfile.lock
53
+ # .ruby-version
54
+ # .ruby-gemset
55
+
56
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
57
+ .rvmrc
58
+
59
+ # End of https://www.gitignore.io/api/ruby
data/README.md CHANGED
@@ -19,7 +19,7 @@ Or install it yourself as:
19
19
  $ gem install worksection-ruby
20
20
 
21
21
  ## Usage
22
- ###API methods: getting data 
22
+ ### API methods: getting data 
23
23
  Action | Method | Hash Parameters
24
24
  -------|--------|-----------
25
25
  Returns project names, their statuses (archive, active, pending), company and relative reference to the project. |get_projects|
@@ -30,7 +30,7 @@ Returns the costs incurred for the period, their executor (user_from field), cor
30
30
  Returns the text field with user comments|get_comments|
31
31
  Returns data about all users in account|get_users|
32
32
 
33
- ###API methods: creating projects/tasks/comments
33
+ ### API methods: creating projects/tasks/comments
34
34
 
35
35
  Action | Method | Hash Parameters
36
36
  -------|--------|-----------
@@ -40,7 +40,7 @@ Creating a Subtask|post_subtask|
40
40
  Placement of time and financial costs in the task or subtask|post_timemoney|
41
41
  Inviting user to the account|add_user|
42
42
 
43
- ###API methods: editing projects/tasks/subtasks/tags
43
+ ### API methods: editing projects/tasks/subtasks/tags
44
44
 
45
45
  Action | Method | Hash Parameters
46
46
  -------|--------|-----------
@@ -161,7 +161,32 @@ puts "#{ JSON.pretty_generate(client.get_all_tasks)}"
161
161
  ````ruby
162
162
  puts "#{ JSON.pretty_generate(client.get_timemoney({datestart: '02.08.2019',dateend: '01.09.2019'}))}"
163
163
  =>
164
-
164
+ {
165
+ "status": "ok",
166
+ "data": [
167
+ {
168
+ "id": "761252",
169
+ "task": {
170
+ "page": "/project/61028/1445772/",
171
+ "name": "Task1",
172
+ "status": "active"
173
+ },
174
+ "project": {
175
+ "page": "/project/61028/",
176
+ "name": "ProjectName1"
177
+ },
178
+ "comment": "",
179
+ "time": "0:18",
180
+ "money": "0.00",
181
+ "date": "2019-08-30",
182
+ "is_timer": false,
183
+ "user_from": {
184
+ "email": "john.doe@email.com",
185
+ "name": "John Doe"
186
+ }
187
+ }
188
+ ]
189
+ }
165
190
  ````
166
191
 
167
192
  ## Contributing
@@ -4,52 +4,52 @@ class Worksection::Client
4
4
  #https://your-domain.com/api/admin/?action=post_comment&page=/project/ID_PROJECT/ID_TASK/&email_user_from=USER_EMAIL&text=TEXT&hash=HASH
5
5
  def post_comment(project_id, task_id, **args)
6
6
  page = "/project/#{project_id}/#{task_id}/"
7
- url = URI("https://#{@domain}/api/admin/?action=post_comment&page=#{page}
8
- #{collect_params(**args)}
9
- &hash=#{to_md5(__method__.to_s, page)}")
7
+ url = URI("https://#{@domain}/api/admin/?action=post_comment&page=#{page}"\
8
+ "#{collect_params(**args)}"\
9
+ "&hash=#{to_md5(__method__.to_s, page)}")
10
10
  perform_request(url)
11
11
  end
12
12
 
13
13
  #https://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
14
  def post_project(**args)
15
- url = URI("https://#{@domain}/api/admin/?action=post_project
16
- #{collect_params(**args)}
17
- &hash=#{to_md5(__method__.to_s, page)}")
15
+ url = URI("https://#{@domain}/api/admin/?action=post_project"\
16
+ "#{collect_params(**args)}"\
17
+ "&hash=#{to_md5(__method__.to_s, page)}")
18
18
  perform_request(url)
19
19
  end
20
20
 
21
21
  #https://your-domain.com/api/admin/?action=post_task&page=/project/PROJECT_ID/&email_user_from=USER_EMAIL&email_user_to=USER_EMAIL&hidden=USER_EMAIL,USER_EMAIL&subscribe=USER_EMAIL,USER_EMAIL&title=TASK_NAME&text=TASK_TEXT&priority=7&datestart=DD.MM.YYYY&dateend= DD.MM.YYYY&tags=Tag1,Tag2&hash=HASH
22
22
  def post_task(project_id, **args)
23
23
  page = "/project/#{project_id}/"
24
- url = URI("https://#{@domain}/api/admin/?action=post_task&page=#{page}
25
- #{collect_params(**args)}
26
- &hash=#{to_md5(__method__.to_s, page)}")
24
+ url = URI("https://#{@domain}/api/admin/?action=post_task&page=#{page}"\
25
+ "#{collect_params(**args)}"\
26
+ "&hash=#{to_md5(__method__.to_s, page)}")
27
27
  perform_request(url)
28
28
  end
29
29
 
30
30
  #https://your-domain.com/api/admin/?action=post_subtask&page=/project/PROJECT_ID/TASK_ID/&email_user_from=USER_EMAIL&email_user_to=USER_EMAIL&hidden=USER_EMAIL,USER_EMAIL&title=SUBTASK_NAME&text=SUBTASK_TEXT&priority=7&datestart=DD.MM.YYYY&dateend=DD.MM.YYYY&tags=Tag1,Tag2&hash =HASH
31
31
  def post_subtask(project_id, task_id, **args)
32
32
  page = "/project/#{project_id}/#{task_id}/"
33
- url = URI("https://#{@domain}/api/admin/?action=post_subtask&page=#{page}
34
- #{collect_params(**args)}
35
- &hash=#{to_md5(__method__.to_s, page)}")
33
+ url = URI("https://#{@domain}/api/admin/?action=post_subtask&page=#{page}"\
34
+ "#{collect_params(**args)}"\
35
+ "&hash=#{to_md5(__method__.to_s, page)}")
36
36
  perform_request(url)
37
37
  end
38
38
 
39
39
  #https://your-domain.com/api/admin/?action=post_timemoney&page=/project/PROJECT_ID/TASK_ID/SUBTASK_ID/&email_user_from=USER_EMAIL&time=TIME&money=MONEY&date=DD.MM.YYYYY&comment=COMMENT&hash=HASH
40
40
  def post_timemoney(project_id, task_id, subtask_id, **args)
41
41
  page = "/project/#{project_id}/#{task_id}/#{subtask_id}/"
42
- url = URI("https://#{@domain}/api/admin/?action=post_timemoney&page=#{page}
43
- #{collect_params(**args)}
44
- &hash=#{to_md5(__method__.to_s, page)}")
42
+ url = URI("https://#{@domain}/api/admin/?action=post_timemoney&page=#{page}"\
43
+ "#{collect_params(**args)}"\
44
+ "&hash=#{to_md5(__method__.to_s, page)}")
45
45
  perform_request(url)
46
46
  end
47
47
 
48
48
  #https://your-domain.com/api/admin/?action=add_user&email=USER_EMAIL&first_name=USER_FIRST_NAME&last_name=USER_LAST_NAME&hash=HASH
49
49
  def add_user(**args)
50
- url = URI("https://#{@domain}/api/admin/?action=add_user
51
- #{collect_params(**args)}
52
- &hash=#{to_md5(__method__.to_s)}")
50
+ url = URI("https://#{@domain}/api/admin/?action=add_user"\
51
+ "#{collect_params(**args)}"\
52
+ "&hash=#{to_md5(__method__.to_s)}")
53
53
  perform_request(url)
54
54
  end
55
55
  end
@@ -4,48 +4,48 @@ class Worksection::Client
4
4
  #https://your-domain.com/api/admin/?action=close_project&page=/project/PROJECT_ID/&hash=HASH
5
5
  def close_project(project_id)
6
6
  page = "/project/#{project_id}/"
7
- url = URI("https://#{@domain}/api/admin/?action=close_project&page=#{page}
8
- &hash=#{to_md5(__method__.to_s, page)}")
7
+ url = URI("https://#{@domain}/api/admin/?action=close_project&page=#{page}"\
8
+ "&hash=#{to_md5(__method__.to_s, page)}")
9
9
  perform_request(url)
10
10
  end
11
11
 
12
12
  #https://your-domain.com/api/admin/?action=activate_project&page=/project/PROJECT_ID/&hash=HASH
13
13
  def activate_project(project_id)
14
14
  page = "/project/#{project_id}/"
15
- url = URI("https://#{@domain}/api/admin/?action=activate_project&page=#{page}
16
- &hash=#{to_md5(__method__.to_s, page)}")
15
+ url = URI("https://#{@domain}/api/admin/?action=activate_project&page=#{page}"\
16
+ "&hash=#{to_md5(__method__.to_s, page)}")
17
17
  perform_request(url)
18
18
  end
19
19
 
20
20
  #https://your-domain.com/api/admin/?action=complete_task&page=/project/PROJECT_ID/TASK_ID/&hash=HASH
21
21
  def complete_task(project_id, task_id)
22
22
  page = "/project/#{project_id}/#{task_id}/"
23
- url = URI("https://#{@domain}/api/admin/?action=complete_task&page=#{page}
24
- &hash=#{to_md5(__method__.to_s, page)}")
23
+ url = URI("https://#{@domain}/api/admin/?action=complete_task&page=#{page}"\
24
+ "&hash=#{to_md5(__method__.to_s, page)}")
25
25
  perform_request(url)
26
26
  end
27
27
 
28
28
  #https://your-domain.com/api/admin/?action=complete_subtask&page=/project/PROJECT_ID/TASK_ID/SUBTASK_ID/&hash=HASH 
29
29
  def complete_subtask(project_id, task_id, subtask_id)
30
30
  page = "/project/#{project_id}/#{task_id}/#{subtask_id}/"
31
- url = URI("https://#{@domain}/api/admin/?action=complete_subtask&page=#{page}
32
- &hash=#{to_md5(__method__.to_s, page)}")
31
+ url = URI("https://#{@domain}/api/admin/?action=complete_subtask&page=#{page}"\
32
+ "&hash=#{to_md5(__method__.to_s, page)}")
33
33
  perform_request(url)
34
34
  end
35
35
 
36
36
  #https://your-domain.com/api/admin/?action=reopen_task&page=/project/PROJECT_ID/TASK_ID/&hash=HASH 
37
37
  def reopen_task(project_id, task_id)
38
38
  page = "/project/#{project_id}/#{task_id}/"
39
- url = URI("https://#{@domain}/api/admin/?action=reopen_task&page=#{page}
40
- &hash=#{to_md5(__method__.to_s, page)}")
39
+ url = URI("https://#{@domain}/api/admin/?action=reopen_task&page=#{page}"\
40
+ "&hash=#{to_md5(__method__.to_s, page)}")
41
41
  perform_request(url)
42
42
  end
43
43
 
44
44
  #https://your-domain.com/api/admin/?action=reopen_subtask&page=/project/PROJECT_ID/TASK_ID/SUBTASK_ID/&hash=HASH 
45
45
  def reopen_subtask(project_id, task_id, subtask_id)
46
46
  page = "/project/#{project_id}/#{task_id}/#{subtask_id}/"
47
- url = URI("https://#{@domain}/api/admin/?action=reopen_subtask&page=#{page}
48
- &hash=#{to_md5(__method__.to_s, page)}")
47
+ url = URI("https://#{@domain}/api/admin/?action=reopen_subtask&page=#{page}"\
48
+ "&hash=#{to_md5(__method__.to_s, page)}")
49
49
  perform_request(url)
50
50
  end
51
51
 
@@ -53,71 +53,71 @@ class Worksection::Client
53
53
  #@option
54
54
  def update_project(project_id, **args)
55
55
  page = "/project=#{project_id}/"
56
- url = URI("https://#{@domain}/api/admin/?action=update_project&page=#{page}
57
- #{collect_params(**args)}
58
- &hash=#{to_md5(__method__.to_s, page)}")
56
+ url = URI("https://#{@domain}/api/admin/?action=update_project&page=#{page}"\
57
+ "#{collect_params(**args)}"\
58
+ "&hash=#{to_md5(__method__.to_s, page)}")
59
59
  perform_request(url)
60
60
  end
61
61
 
62
62
  #https://your-domain.com/api/admin/?action=update_task&page=/project/PROJECT_ID/TASK_ID/&email_user_to=USER_EMAIL&title=TASK_NAME&priority=7&datestart=DD.MM.YYYY&dateend=DD.MM.YYYY&hash=HASH
63
63
  def update_task(project_id, task_id, **args)
64
64
  page = "/project/#{project_id}/#{task_id}/"
65
- url = URI("https://#{@domain}/api/admin/?action=update_task&page=#{page}
66
- #{collect_params(**args)}
67
- &hash=#{to_md5(__method__.to_s, page)}")
65
+ url = URI("https://#{@domain}/api/admin/?action=update_task&page=#{page}"\
66
+ "#{collect_params(**args)}"\
67
+ "&hash=#{to_md5(__method__.to_s, page)}")
68
68
  perform_request(url)
69
69
  end
70
70
 
71
71
  def update_subtask(project_id, task_id, subtask_id, **args)
72
72
  page = "/project/#{project_id}/#{task_id}/#{subtask_id}/"
73
- url = URI("https://#{@domain}/api/admin/?action=update_subtask&page=#{page}
74
- #{collect_params(**args)}
75
- &hash=#{to_md5(__method__.to_s, page)}")
73
+ url = URI("https://#{@domain}/api/admin/?action=update_subtask&page=#{page}"\
74
+ "#{collect_params(**args)}"\
75
+ "&hash=#{to_md5(__method__.to_s, page)}")
76
76
  perform_request(url)
77
77
  end
78
78
 
79
79
  #https://your-domain.com/api/admin/?action=update_timemoney&page=/project/ID_PROJECT/ID_TASK/&id=ID_TIMEMONEY&comment=UPDATED&time=2&is_rate=1&hash=HASH
80
80
  def update_timemoney(project_id, task_id, subtask_id = nil, **args)
81
81
  page = "/project/#{project_id}/#{task_id}/#{subtask_id}/".gsub('//','/')
82
- url = URI("https://#{@domain}/api/admin/?action=update_timemoney&page=#{page}
83
- #{collect_params(**args)}
84
- &hash=#{to_md5(__method__.to_s, page)}")
82
+ url = URI("https://#{@domain}/api/admin/?action=update_timemoney&page=#{page}"\
83
+ "#{collect_params(**args)}"\
84
+ "&hash=#{to_md5(__method__.to_s, page)}")
85
85
  perform_request(url)
86
86
  end
87
87
 
88
88
  #https://your-domain.com/api/admin/?action=delete_timemoney&page=/project/ID_PROJECT/ID_TASK/&id=ID_TIMEMONEY&hash=HASH
89
89
  def delete_timemoney(project_id, task_id, **args)
90
90
  page = "/project/#{project_id}/#{task_id}/"
91
- url = URI("https://#{@domain}/api/admin/?action=delete_timemoney&page=#{page}
92
- #{collect_params(**args)}
93
- &hash=#{to_md5(__method__.to_s, page)}")
91
+ url = URI("https://#{@domain}/api/admin/?action=delete_timemoney&page=#{page}"\
92
+ "#{collect_params(**args)}"\
93
+ "&hash=#{to_md5(__method__.to_s, page)}")
94
94
  perform_request(url)
95
95
  end
96
96
 
97
97
  #https://your-domain.com/api/admin/?action=subscribe&page=/project/PROJECT_ID/TASK_ID/&email_user=USER_EMAIL&hash=HASH 
98
98
  def subscribe(project_id, task_id, **args)
99
99
  page = "/project/#{project_id}/#{task_id}/"
100
- url = URI("https://#{@domain}/api/admin/?action=subscribe&page=#{page}
101
- #{collect_params(**args)}
102
- &hash=#{to_md5(__method__.to_s, page)}")
100
+ url = URI("https://#{@domain}/api/admin/?action=subscribe&page=#{page}"\
101
+ "#{collect_params(**args)}"\
102
+ "&hash=#{to_md5(__method__.to_s, page)}")
103
103
  perform_request(url)
104
104
  end
105
105
 
106
106
  #https://your-domain.com/api/admin/?action=unsubscribe&page=/project/PROJECT_ID/TASK_ID/&email_user=USER_EMAIL&hash=HASH 
107
107
  def unsubscribe(project_id, task_id, **args)
108
108
  page = "/project/#{project_id}/#{task_id}/"
109
- url = URI("https://#{@domain}/api/admin/?action=unsubscribe&page=#{page}
110
- #{collect_params(**args)}
111
- &hash=#{to_md5(__method__.to_s, page)}")
109
+ url = URI("https://#{@domain}/api/admin/?action=unsubscribe&page=#{page}"\
110
+ "#{collect_params(**args)}"\
111
+ "&hash=#{to_md5(__method__.to_s, page)}")
112
112
  perform_request(url)
113
113
  end
114
114
 
115
115
  #https://your-domain.com/api/admin/?action=update_tags&page=/project/PROJECT_ID/TASK_ID/&plus=Tag1,Tag2&minus=Tag3,Tag4&hash=HASH
116
116
  def update_tags(project_id, task_id, **args)
117
117
  page = "/project/#{project_id}/#{task_id}/"
118
- url = URI("https://#{@domain}/api/admin/?action=update_tags&page=#{page}
119
- #{collect_params(**args)}
120
- &hash=#{to_md5(__method__.to_s, page)}")
118
+ url = URI("https://#{@domain}/api/admin/?action=update_tags&page=#{page}"\
119
+ "#{collect_params(**args)}"\
120
+ "&hash=#{to_md5(__method__.to_s, page)}")
121
121
  perform_request(url)
122
122
  end
123
123
  end
@@ -2,64 +2,68 @@ class Worksection::Client
2
2
  module GettingData
3
3
  #https://your-domain.com/api/admin/?action=get_projects&hash=HASH
4
4
  def get_projects(**args)
5
- url = URI("https://#{@domain}/api/admin/?action=get_projects
6
- #{collect_params(**args)}
7
- &hash=#{to_md5(__method__.to_s)}")
5
+ url = URI("https://#{@domain}/api/admin/?action=get_projects"\
6
+ "#{collect_params(**args)}"\
7
+ "&hash=#{to_md5(__method__.to_s)}")
8
+ puts url
8
9
  perform_request(url)
9
10
  end
10
11
 
11
12
  #https://your-domain.com/api/admin/?action=get_all_tasks&hash=HASH
12
13
  def get_all_tasks(**args)
13
- url = URI("https://#{@domain}/api/admin/?action=get_all_tasks
14
- #{collect_params(**args)}
15
- &hash=#{to_md5(__method__.to_s)}")
14
+ url = URI("https://#{@domain}/api/admin/?action=get_all_tasks"\
15
+ "#{collect_params(**args)}"\
16
+ "&hash=#{to_md5(__method__.to_s)}")
16
17
  perform_request(url)
17
18
  end
18
19
 
19
20
  #https://your-domain.com/api/admin/?action=get_priority&hash=HASH
20
21
  def get_priority(**args)
21
- url = URI("https://#{@domain}/api/admin/?action=get_priority
22
- #{collect_params(**args)}
23
- &hash=#{to_md5(__method__.to_s)}")
22
+ url = URI("https://#{@domain}/api/admin/?action=get_priority"\
23
+ "#{collect_params(**args)}"\
24
+ "&hash=#{to_md5(__method__.to_s)}")
24
25
  perform_request(url)
25
26
  end
26
27
 
27
28
  #https://your-domain.com/api/admin/?action=get_task&page=/project/PROJECT_ID/TASK_ID/&hash=HASH
28
29
  def get_task(project_id, task_id, **args)
29
30
  page = "/project/#{project_id}/#{task_id}/"
30
- url = URI("https://#{@domain}/api/admin/?action=get_task&page=#{page}
31
- #{collect_params(**args)}
32
- &hash=#{to_md5(__method__.to_s, page)}")
31
+ url = URI("https://#{@domain}/api/admin/?action=get_task&page=#{page}"\
32
+ "#{collect_params(**args)}"\
33
+ "&hash=#{to_md5(__method__.to_s, page)}")
33
34
  perform_request(url)
34
35
  end
35
36
 
36
37
  #https://your-domain.com/api/admin/?action=get_tasks&page=/project/PROJECT_ID/&hash=HASH
37
38
  def get_tasks(project_id, **args)
38
39
  page = "/project/#{project_id}"
39
- url = URI("https://#{@domain}/api/admin/?action=get_tasks&page=#{page}
40
- #{collect_params(**args)}
41
- &hash=#{to_md5(__method__.to_s, page)}")
40
+ url = URI("https://#{@domain}/api/admin/?action=get_tasks&page=#{page}"\
41
+ "#{collect_params(**args)}"\
42
+ "&hash=#{to_md5(__method__.to_s, page)}")
42
43
  perform_request(url)
43
44
  end
44
45
 
45
46
  #https://your-domain.com/api/admin/?action=get_timemoney&hash=HASH
46
47
  def get_timemoney(**args)
47
- url = URI("https://#{@domain}/api/admin/?action=get_timemoney
48
- #{collect_params(**args)}
49
- &hash=#{to_md5(__method__.to_s)}")
48
+ url = URI("https://#{@domain}/api/admin/?action=get_timemoney"\
49
+ "#{collect_params(**args)}"\
50
+ "&hash=#{to_md5(__method__.to_s)}")
51
+ puts url
50
52
  perform_request(url)
51
53
  end
52
54
 
53
55
  #https://your-domain.com/api/admin/?action=get_comments&page=/project/ID_PROJECT/ID_TASK/&hash=HASH
54
56
  def get_comments(project_id, task_id)
55
57
  page = "/project/#{project_id}/#{task_id}/"
56
- url = URI("https://#{@domain}/api/admin/?action=get_comments&page=#{page}&hash=#{to_md5(__method__.to_s, page)}")
58
+ url = URI("https://#{@domain}/api/admin/?action=get_comments&page=#{page}"\
59
+ "&hash=#{to_md5(__method__.to_s, page)}")
57
60
  perform_request(url)
58
61
  end
59
62
 
60
63
  #https://your-domain.com/api/admin/?action=get_users&hash=HASH
61
64
  def get_users
62
- url = URI("https://#{@domain}/api/admin/?action=get_users&hash=#{to_md5(__method__.to_s)}")
65
+ url = URI("https://#{@domain}/api/admin/?action=get_users"\
66
+ "&hash=#{to_md5(__method__.to_s)}")
63
67
  perform_request(url)
64
68
  end
65
69
  end
@@ -1,3 +1,3 @@
1
1
  module Worksection
2
- VERSION = "0.0.401"
2
+ VERSION = "0.0.402"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worksection-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.401
4
+ version: 0.0.402
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentin
@@ -99,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubyforge_project:
103
- rubygems_version: 2.7.8
102
+ rubygems_version: 3.0.1
104
103
  signing_key:
105
104
  specification_version: 4
106
105
  summary: Worksection Api Client