toptranslation_api 4.0.0 → 4.0.1
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/lib/toptranslation/connection.rb +10 -14
- data/lib/toptranslation/version.rb +1 -1
- data/lib/toptranslation_api.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 140f94e2e25c9357172453fb58101208550a1098f8048deecd81d1b421ad33ac
|
|
4
|
+
data.tar.gz: a570ab8cf8e7f24c7159010bd1e3d32e94391104e691aef36c8b626c819744ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc1b87834f48e48c83f3afb9c736ef386866b344e7a29a32c00e33102ac3287ba1813e9e66ebdc63cdde2868cc0e0384557061080a7721d1a48d4fd69c7bdca4
|
|
7
|
+
data.tar.gz: eb67def54933c5cba080324dc26f8757e0a3eab55e279823a580cce4c8c27ff1bb387eef5dac1d1e7c71955e3f21a26686e40b9d38cab77d89c41ce68038d33f
|
|
@@ -38,20 +38,16 @@ module Toptranslation
|
|
|
38
38
|
upload_file(file, uri, &block)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
puts "# Requested access token #{@access_token}" if @verbose
|
|
53
|
-
|
|
54
|
-
@access_token
|
|
41
|
+
# @deprecated Email/password sign-in was removed from the Toptranslation
|
|
42
|
+
# API (authentication moved to the auth service) — the endpoint this
|
|
43
|
+
# method used no longer exists. Initialize the client with a static
|
|
44
|
+
# access token instead.
|
|
45
|
+
def sign_in!(_options = {})
|
|
46
|
+
raise Toptranslation::SignInRemovedError,
|
|
47
|
+
'sign_in! with email/password is no longer supported: the Toptranslation API ' \
|
|
48
|
+
'removed POST /v2/auth/sign_in. Initialize the client with a static access ' \
|
|
49
|
+
"token instead: Toptranslation.new(access_token: '...'). Contact " \
|
|
50
|
+
'support@toptranslation.com to obtain a token.'
|
|
55
51
|
end
|
|
56
52
|
|
|
57
53
|
private
|
data/lib/toptranslation_api.rb
CHANGED
|
@@ -20,6 +20,11 @@ require 'toptranslation/resource/upload'
|
|
|
20
20
|
require 'toptranslation/resource/user'
|
|
21
21
|
|
|
22
22
|
module Toptranslation
|
|
23
|
+
# Raised when the removed email/password sign-in is used — the API only
|
|
24
|
+
# accepts static access tokens since authentication moved to the
|
|
25
|
+
# Toptranslation auth service.
|
|
26
|
+
class SignInRemovedError < StandardError; end
|
|
27
|
+
|
|
23
28
|
def self.new(options)
|
|
24
29
|
Toptranslation::Client.new(options)
|
|
25
30
|
end
|