ruby-upwork-oauth2 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a4915b44ecebc770a8579821212323ed86672a070b039ebe128fd1ab06ccfa5
4
- data.tar.gz: ba252c00d17c7e41f23ab3c4d806a5699fe5ad5dd7a21bbceddaa55cfc58351f
3
+ metadata.gz: 3d462a40bad37a15ed9a8ce9893d96a61477d2f81fe40c6c644732cda614d712
4
+ data.tar.gz: bc05cd0bca0d6b41326c5332be9bd0f65a08c79251daa64883dfc446dd647e18
5
5
  SHA512:
6
- metadata.gz: 40c30c0a23dce2fbb3f1ce7da16b14553c8efa5965094d6d15200f8b4f1015a09498984b031d7908128ba95753b0adb410353f6884a547ce759f9ddc7ef8de1f
7
- data.tar.gz: b680fdace7dc77352d388efc33c33cb4eadd17630b8919132c24ebdbbdefbc6e97f89f8d9b3b7c5d8fbff7610a081f0fcce48a65697d7430b9b568cfeae5a700
6
+ metadata.gz: 041e38ed1db206cf89db42cecb11a0fd757cd583dddcb51eb72e507dbe512691a104aec2ee4cf1f529896687d0d40bf07a56b875aab098e8a89ea6758cb7056e
7
+ data.tar.gz: e686b4848f3e8c9086ca293e6bc33db59efaf69d86be713798eafcd5f41ddf49859ed3a49c7103cf77c3af6101ffdc6c3514d9c1038d265ad035ebe65a76d56a
data/CHANGES.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Release History
2
2
 
3
+ ## 2.1.2
4
+ * Add Room Messages API
5
+ * Sync-up routers with OAuth1 version
6
+
7
+ ## 2.2.1
8
+ * Resolve a vulnarable dependency
9
+
3
10
  ## 2.1.0
4
11
  * Add Specialties API
5
12
  * Add Skills V2 API
@@ -44,7 +44,7 @@ module Upwork
44
44
  # engagement: (String)
45
45
  # params: (Hash)
46
46
  def assign(company, team, engagement, params)
47
- @client.put '/otask/v1/tasks/companies/' + company + '/' + team + '/engagements/' + engagement, params
47
+ @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/engagements/' + engagement + '/tasks', params
48
48
  end
49
49
 
50
50
  # Assign to specific engagement the list of activities
@@ -53,7 +53,7 @@ module Upwork
53
53
  # engagement_ref: (String)
54
54
  # params: (Hash)
55
55
  def assign_to_engagement(engagement_ref, params)
56
- @client.put '/tasks/v2/tasks/contracts/' + engagement_ref
56
+ @client.put '/tasks/v2/tasks/contracts/' + engagement_ref, params
57
57
  end
58
58
 
59
59
  end
@@ -47,6 +47,17 @@ module Upwork
47
47
  @client.get '/messages/v3/' + company + '/rooms/' + room_id, params
48
48
  end
49
49
 
50
+ # Get messages from a specific room
51
+ #
52
+ # Arguments:
53
+ # company: (String)
54
+ # room_id: (String)
55
+ # params: (Hash)
56
+ def get_room_messages(company, room_id, params = {})
57
+ $LOG.i "running " + __method__.to_s
58
+ @client.get '/messages/v3/' + company + '/rooms/' + room_id + '/stories', params
59
+ end
60
+
50
61
  # Get a specific room by offer ID
51
62
  #
52
63
  # Arguments:
@@ -89,7 +100,7 @@ module Upwork
89
100
  $LOG.i "running " + __method__.to_s
90
101
  @client.post '/messages/v3/' + company + '/rooms', params
91
102
  end
92
-
103
+
93
104
  # Send a message to a room
94
105
  #
95
106
  # Arguments:
@@ -100,7 +111,7 @@ module Upwork
100
111
  $LOG.i "running " + __method__.to_s
101
112
  @client.post '/messages/v3/' + company + '/rooms/' + room_id + '/stories', params
102
113
  end
103
-
114
+
104
115
  # Update a room settings
105
116
  #
106
117
  # Arguments:
@@ -34,7 +34,7 @@ module Upwork
34
34
  # ts: (String)
35
35
  def get_by_contract(contract, ts)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/team/v2/snapshots/contracts/' + contract + '/' + ts
37
+ @client.get '/team/v3/snapshots/contracts/' + contract + '/' + ts
38
38
  end
39
39
 
40
40
  # Update snapshot by specific contract
@@ -45,7 +45,7 @@ module Upwork
45
45
  # params: (Hash)
46
46
  def update_by_contract(contract, ts, params)
47
47
  $LOG.i "running " + __method__.to_s
48
- @client.put '/team/v2/snapshots/contracts/' + contract + '/' + ts, params
48
+ @client.put '/team/v3/snapshots/contracts/' + contract + '/' + ts, params
49
49
  end
50
50
 
51
51
  # Delete snapshot by specific contract
@@ -54,7 +54,7 @@ module Upwork
54
54
  # ts: (String)
55
55
  def delete_by_contract(contract, ts)
56
56
  $LOG.i "running " + __method__.to_s
57
- @client.delete '/team/v2/snapshots/contracts/' + contract + '/' + ts
57
+ @client.delete '/team/v3/snapshots/contracts/' + contract + '/' + ts
58
58
  end
59
59
  end
60
60
  end
@@ -35,7 +35,7 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def get_by_company(company, from_date, till_date, params = {})
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.get '/team/v2/workdays/companies/' + company + '/' + from_date + ',' + till_date, params
38
+ @client.get '/team/v3/workdays/companies/' + company + '/' + from_date + ',' + till_date, params
39
39
  end
40
40
 
41
41
  # Get Workdays by Contract
@@ -46,7 +46,7 @@ module Upwork
46
46
  # params: (Hash)
47
47
  def get_by_contract(contract, from_date, till_date, params = {})
48
48
  $LOG.i "running " + __method__.to_s
49
- @client.get '/team/v2/workdays/contracts/' + contract + '/' + from_date + ',' + till_date, params
49
+ @client.get '/team/v3/workdays/contracts/' + contract + '/' + from_date + ',' + till_date, params
50
50
  end
51
51
  end
52
52
  end
@@ -27,6 +27,16 @@ module Upwork
27
27
  @client.epoint = ENTRY_POINT
28
28
  end
29
29
 
30
+ # Get Workdiary by Company
31
+ # Arguments:
32
+ # company: (String)
33
+ # date: (String)
34
+ # params: (Hash)
35
+ def get(company, date, params = {})
36
+ $LOG.i "running " + __method__.to_s
37
+ @client.get '/team/v3/workdiaries/companies/' + company + '/' + date, params
38
+ end
39
+
30
40
  # Get Work Diary by Contract
31
41
  # Arguments:
32
42
  # contract: (String)
@@ -34,7 +44,7 @@ module Upwork
34
44
  # params: (Hash)
35
45
  def get_by_contract(contract, date, params = {})
36
46
  $LOG.i "running " + __method__.to_s
37
- @client.get '/team/v2/workdiaries/contracts/' + contract + '/' + date, params
47
+ @client.get '/team/v3/workdiaries/contracts/' + contract + '/' + date, params
38
48
  end
39
49
  end
40
50
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Upwork # :nodoc:
15
15
  module Api
16
- VERSION = "2.1.1"
16
+ VERSION = "2.1.2"
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-upwork-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym Novozhylov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-02 00:00:00.000000000 Z
11
+ date: 2020-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -189,8 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubyforge_project:
193
- rubygems_version: 2.7.6.2
192
+ rubygems_version: 3.1.2
194
193
  signing_key:
195
194
  specification_version: 4
196
195
  summary: Ruby bindings for Upwork API (OAuth2).