Class: YandexClient::Passport
- Inherits:
-
Object
- Object
- YandexClient::Passport
- Includes:
- Configurable, ErrorHandler
- Defined in:
- lib/yandex_client/passport.rb
Overview
tech.yandex.ru/passport/doc/dg/reference/request-docpage/
Example:
YandexClient::Passport::Client[Token.first.access_token].info
Constant Summary collapse
- ACTION_URL =
'https://login.yandex.ru/info'
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Class Method Summary collapse
- .with_token(token) ⇒ Object (also: [])
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(token) ⇒ Passport
constructor
A new instance of Passport.
Methods included from Configurable
Constructor Details
#initialize(token) ⇒ Passport
Returns a new instance of Passport.
24 25 26 |
# File 'lib/yandex_client/passport.rb', line 24 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
14 15 16 |
# File 'lib/yandex_client/passport.rb', line 14 def token @token end |
Class Method Details
.with_token(token) ⇒ Object Also known as: []
17 18 19 |
# File 'lib/yandex_client/passport.rb', line 17 def with_token(token) new(token) end |
Instance Method Details
#info ⇒ Object
28 29 30 31 |
# File 'lib/yandex_client/passport.rb', line 28 def info process_response \ with_config.get(ACTION_URL, headers: auth_headers) end |