mprofi_api_client 0.1.1 → 0.1.2
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/README.md +2 -0
- data/lib/mprofi_api_client/connector.rb +8 -0
- data/lib/mprofi_api_client.rb +1 -1
- 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: e672e6efb39e725b2e70c5ca5fb305da4791f6bba01f7f5a342b4b99d598c4f5
|
|
4
|
+
data.tar.gz: f990673eac1bf7e0c2f3346303d1383374d479ada6041c04b9d2806bc5846731
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d01c66ac892de2bcf5733d1a698f1f073a5b3493e9fef42a957aa5d8543f423e430731b263c485d3c0add12dbbff3ff8761f41f9d3f2fe7d9662f29694272bb9
|
|
7
|
+
data.tar.gz: 36148abd51b617bef3aab90198eaf6e247b51e6a09c7108752b7d7566023cd6b5c544fd322865804a4ad7b63fc1de7f33edd4f927469d83d3f99ad9204d60f0c
|
data/README.md
CHANGED
|
@@ -38,6 +38,8 @@ connector = MprofiApiClient::Connector.new(API_TOKEN)
|
|
|
38
38
|
# or
|
|
39
39
|
# connector = MprofiApiClient::Connector.new(API_TOKEN, 'http://your_proxy_host_address:8080/')
|
|
40
40
|
begin
|
|
41
|
+
# you can change read_timeout if the default of 60 seconds is not enough
|
|
42
|
+
# connector.read_timeout = 120
|
|
41
43
|
connector.add_message('501002003', 'Test message 1', 'your-msg-id-001')
|
|
42
44
|
# message with Polish diacritics
|
|
43
45
|
connector.add_message('601002003', 'Test message ąćęłńóśźż', 'your-msg-id-002', encoding: 'utf-8')
|
|
@@ -27,6 +27,7 @@ module MprofiApiClient
|
|
|
27
27
|
@proxy_url = proxy_url
|
|
28
28
|
@messages = []
|
|
29
29
|
@clear_messages = true
|
|
30
|
+
@read_timeout = nil
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
# Add one message to message queue.
|
|
@@ -85,6 +86,11 @@ module MprofiApiClient
|
|
|
85
86
|
return result
|
|
86
87
|
end
|
|
87
88
|
|
|
89
|
+
# Set read timeout
|
|
90
|
+
# +timeout+ - number of seconds
|
|
91
|
+
def read_timeout=(timeout)
|
|
92
|
+
@read_timeout = timeout
|
|
93
|
+
end
|
|
88
94
|
|
|
89
95
|
private
|
|
90
96
|
|
|
@@ -123,6 +129,8 @@ module MprofiApiClient
|
|
|
123
129
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
124
130
|
end
|
|
125
131
|
|
|
132
|
+
http.read_timeout = @read_timeout unless @read_timeout.nil?
|
|
133
|
+
|
|
126
134
|
result = http.request(request)
|
|
127
135
|
rescue Exception => err
|
|
128
136
|
raise MprofiConnectionError.new(err.message, err)
|
data/lib/mprofi_api_client.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mprofi_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- COMVERGA Sp. z o. o.
|
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
113
113
|
- !ruby/object:Gem::Version
|
|
114
114
|
version: '0'
|
|
115
115
|
requirements: []
|
|
116
|
-
rubygems_version: 3.
|
|
116
|
+
rubygems_version: 3.1.6
|
|
117
117
|
signing_key:
|
|
118
118
|
specification_version: 4
|
|
119
119
|
summary: MProfi API client library
|