upwork-api 1.3.4 → 1.3.5

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: 43c3070a0cf1763031974d2f249358e0d425394a353af289a3102c6defc117cb
4
- data.tar.gz: 0c69071438f4981a591132f824578d5c394823dffb10034cb4def8bc2103862c
3
+ metadata.gz: ebd5a01663e5177177beebc70dfd4e402eba1abfae5f4009176acd89a3480e4e
4
+ data.tar.gz: aa0e0d4bd459a56e16dd9bb5b782fd55754a5269e37a2989e7fafa45be0d9f4a
5
5
  SHA512:
6
- metadata.gz: 76d52d40c47f08d9d61fd22ec829ad3af49a817d8d98a555681e02677c8301479bfdc17eaced488f083fe68827b3223aa1532c4f45f4c511ce1cc079e9d4daa1
7
- data.tar.gz: f3cea20ef437ae2911954c8519f82ba4e01d5bfa34c65a8251df9a7455d230e9dec7027e69b0241edc10523cea1cbcba225a777298337b0aec61ead68d1bd3c6
6
+ metadata.gz: 467640cc6c17a01bc37ce2f94523a61951e247e5078b6c87b1b16a48c9edcb3a1ca6377c1702370c5c52269ac6a2887e1c2c932409f2872b3b5e850dad46f1be
7
+ data.tar.gz: '099570b67682911a5456e7ea5467994fe76a9f922ff017eb909fbc8252642c8fffffd51e2c13b44a91859eaeb1cc78d6f86ce8931a62488be65ad30b9061a8af'
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History
2
2
 
3
+ ## 1.3.5
4
+ * Send Message to a Batch of Rooms API
5
+ * Bug fixes
6
+
3
7
  ## 1.3.4
4
8
  * Add Room Messages API
5
9
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- Ruby bindings for Upwork API
1
+ Ruby bindings for Upwork API (OAuth1)
2
2
  ============
3
3
 
4
- [![License](http://img.shields.io/packagist/l/upwork/php-upwork.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
4
+ [![License](https://img.shields.io/github/license/upwork/ruby-upwork)](http://www.apache.org/licenses/LICENSE-2.0.html)
5
5
  [![Gem Version](https://badge.fury.io/rb/upwork-api.svg)](http://badge.fury.io/rb/upwork-api)
6
6
  [![GitHub release](https://img.shields.io/github/release/upwork/ruby-upwork.svg)](https://github.com/upwork/ruby-upwork/releases)
7
7
  [![Build Status](https://travis-ci.org/upwork/ruby-upwork.svg)](https://travis-ci.org/upwork/ruby-upwork)
@@ -44,7 +44,7 @@ module Upwork
44
44
  # reference: (String)
45
45
  def get_specific(reference)
46
46
  $LOG.i "running " + __method__.to_s
47
- @client.get '/hr/v4/contractors/applications' + reference
47
+ @client.get '/hr/v4/contractors/applications/' + reference
48
48
  end
49
49
  end
50
50
  end
@@ -44,7 +44,7 @@ module Upwork
44
44
  # reference: (String)
45
45
  def get_specific(reference)
46
46
  $LOG.i "running " + __method__.to_s
47
- @client.get '/offers/v1/clients/offers/' + reference
47
+ @client.get '/offers/v1/contractors/offers/' + reference
48
48
  end
49
49
 
50
50
  # Apply specific action
@@ -54,7 +54,7 @@ module Upwork
54
54
  # params: (Hash)
55
55
  def actions(reference, params)
56
56
  $LOG.i "running " + __method__.to_s
57
- @client.post '/offers/v1/clients/actions/' + reference, params
57
+ @client.post '/offers/v1/contractors/actions/' + reference, params
58
58
  end
59
59
  end
60
60
  end
@@ -57,7 +57,7 @@ module Upwork
57
57
  $LOG.i "running " + __method__.to_s
58
58
  @client.get '/messages/v3/' + company + '/rooms/' + room_id + '/stories', params
59
59
  end
60
-
60
+
61
61
  # Get a specific room by offer ID
62
62
  #
63
63
  # Arguments:
@@ -112,6 +112,16 @@ module Upwork
112
112
  @client.post '/messages/v3/' + company + '/rooms/' + room_id + '/stories', params
113
113
  end
114
114
 
115
+ # Send a message to a batch of rooms
116
+ #
117
+ # Arguments:
118
+ # company: (String)
119
+ # params: (Hash)
120
+ def send_message_to_rooms(company, params = {})
121
+ $LOG.i "running " + __method__.to_s
122
+ @client.post '/messages/v3/' + company + '/stories/batch', params
123
+ end
124
+
115
125
  # Update a room settings
116
126
  #
117
127
  # Arguments:
@@ -42,7 +42,7 @@ module Upwork
42
42
  # Get skills V2
43
43
  def get_skills_v2(params)
44
44
  $LOG.i "running " + __method__.to_s
45
- @client.get '/profiles/v2/metadata/skills'
45
+ @client.get '/profiles/v2/metadata/skills', params
46
46
  end
47
47
 
48
48
  # Get specialties
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Upwork # :nodoc:
15
15
  module Api
16
- VERSION = "1.3.4"
16
+ VERSION = "1.3.5"
17
17
  end
18
18
  end
@@ -19,6 +19,11 @@ class MessagesTest < Test::Unit::TestCase
19
19
  assert api.get_room_details('company', 'room-id', {})
20
20
  end
21
21
 
22
+ def test_get_room_messages
23
+ api = Upwork::Api::Routers::Messages.new(get_client_mock)
24
+ assert api.get_room_messages('company', 'room-id', {})
25
+ end
26
+
22
27
  def test_get_room_by_offer
23
28
  api = Upwork::Api::Routers::Messages.new(get_client_mock)
24
29
  assert api.get_room_by_offer('company', '1234', {})
@@ -43,6 +48,11 @@ class MessagesTest < Test::Unit::TestCase
43
48
  api = Upwork::Api::Routers::Messages.new(get_client_mock)
44
49
  assert api.send_message_to_room('company', 'room-id', {})
45
50
  end
51
+
52
+ def test_send_message_to_rooms
53
+ api = Upwork::Api::Routers::Messages.new(get_client_mock)
54
+ assert api.send_message_to_rooms('company', {})
55
+ end
46
56
 
47
57
  def test_update_room_settings
48
58
  api = Upwork::Api::Routers::Messages.new(get_client_mock)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upwork-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
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-05-08 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth