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 +4 -4
- data/CHANGES.md +3 -0
- data/README.md +1 -1
- data/lib/upwork/api/routers/messages.rb +10 -0
- data/lib/upwork/api/version.rb +1 -1
- data/test/test_messages.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae0c55c23aa24352c0f7abbb6e8997c9ddd9a569f18e51073d677ee1db27de56
|
4
|
+
data.tar.gz: 1146d2241c4ef5309dcbfa9437cfe07531e72c5c61b5fbf1188a7279802e4ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de51dee4754a23762d8641acb725641838942563bcef8389058db5dd915e624105242d5266c932d833c85ebdd3c085b7ccfd57369eace355d8640aac135e4b0
|
7
|
+
data.tar.gz: '064596e784a903ca8415a130a9df988ead4082dbe6ac2037dc6cbd55d9920f1dd6f97e979604070c8a761a55250579f203e7278456cea262c555dda69773e483'
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Ruby bindings for Upwork API (OAuth2)
|
2
2
|
============
|
3
3
|
|
4
|
-
[![License](
|
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:
|
data/lib/upwork/api/version.rb
CHANGED
data/test/test_messages.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|