ruby-upwork-oauth2 2.1.2 → 2.1.3

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: 3d462a40bad37a15ed9a8ce9893d96a61477d2f81fe40c6c644732cda614d712
4
- data.tar.gz: bc05cd0bca0d6b41326c5332be9bd0f65a08c79251daa64883dfc446dd647e18
3
+ metadata.gz: ae0c55c23aa24352c0f7abbb6e8997c9ddd9a569f18e51073d677ee1db27de56
4
+ data.tar.gz: 1146d2241c4ef5309dcbfa9437cfe07531e72c5c61b5fbf1188a7279802e4ac1
5
5
  SHA512:
6
- metadata.gz: 041e38ed1db206cf89db42cecb11a0fd757cd583dddcb51eb72e507dbe512691a104aec2ee4cf1f529896687d0d40bf07a56b875aab098e8a89ea6758cb7056e
7
- data.tar.gz: e686b4848f3e8c9086ca293e6bc33db59efaf69d86be713798eafcd5f41ddf49859ed3a49c7103cf77c3af6101ffdc6c3514d9c1038d265ad035ebe65a76d56a
6
+ metadata.gz: 7de51dee4754a23762d8641acb725641838942563bcef8389058db5dd915e624105242d5266c932d833c85ebdd3c085b7ccfd57369eace355d8640aac135e4b0
7
+ data.tar.gz: '064596e784a903ca8415a130a9df988ead4082dbe6ac2037dc6cbd55d9920f1dd6f97e979604070c8a761a55250579f203e7278456cea262c555dda69773e483'
data/CHANGES.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Release History
2
2
 
3
+ ## 2.1.3
4
+ * Send Message to a Batch of Rooms API
5
+
3
6
  ## 2.1.2
4
7
  * Add Room Messages API
5
8
  * Sync-up routers with OAuth1 version
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Ruby bindings for Upwork API (OAuth2)
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-oauth2)](http://www.apache.org/licenses/LICENSE-2.0.html)
5
5
  [![Gem Version](https://badge.fury.io/rb/ruby-upwork-oauth2.svg)](http://badge.fury.io/rb/ruby-upwork-oauth2)
6
6
  [![GitHub release](https://img.shields.io/github/release/upwork/ruby-upwork-oauth2.svg)](https://github.com/upwork/ruby-upwork-oauth2/releases)
7
7
  [![Build Status](https://travis-ci.org/upwork/ruby-upwork-oauth2.svg)](https://travis-ci.org/upwork/ruby-upwork-oauth2)
@@ -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:
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Upwork # :nodoc:
15
15
  module Api
16
- VERSION = "2.1.2"
16
+ VERSION = "2.1.3"
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', {})
@@ -44,6 +49,11 @@ class MessagesTest < Test::Unit::TestCase
44
49
  assert api.send_message_to_room('company', 'room-id', {})
45
50
  end
46
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
56
+
47
57
  def test_update_room_settings
48
58
  api = Upwork::Api::Routers::Messages.new(get_client_mock)
49
59
  assert api.update_room_settings('company', 'room-id', 'username', {})
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.2
4
+ version: 2.1.3
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: oauth2