upwork-api 1.3.4 → 1.3.5
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 +4 -4
- data/CHANGES.md +4 -0
- data/README.md +2 -2
- data/lib/upwork/api/routers/hr/freelancers/applications.rb +1 -1
- data/lib/upwork/api/routers/hr/freelancers/offers.rb +2 -2
- data/lib/upwork/api/routers/messages.rb +11 -1
- data/lib/upwork/api/routers/metadata.rb +1 -1
- 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: ebd5a01663e5177177beebc70dfd4e402eba1abfae5f4009176acd89a3480e4e
|
4
|
+
data.tar.gz: aa0e0d4bd459a56e16dd9bb5b782fd55754a5269e37a2989e7fafa45be0d9f4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 467640cc6c17a01bc37ce2f94523a61951e247e5078b6c87b1b16a48c9edcb3a1ca6377c1702370c5c52269ac6a2887e1c2c932409f2872b3b5e850dad46f1be
|
7
|
+
data.tar.gz: '099570b67682911a5456e7ea5467994fe76a9f922ff017eb909fbc8252642c8fffffd51e2c13b44a91859eaeb1cc78d6f86ce8931a62488be65ad30b9061a8af'
|
data/CHANGES.md
CHANGED
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
|
-
[](http://www.apache.org/licenses/LICENSE-2.0.html)
|
5
5
|
[](http://badge.fury.io/rb/upwork-api)
|
6
6
|
[](https://github.com/upwork/ruby-upwork/releases)
|
7
7
|
[](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 '/offers/v1/
|
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/
|
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:
|
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', {})
|
@@ -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
|
+
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-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|