ruby-identitas-api 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +32 -2
- data/lib/ruby/identitas/api/version.rb +1 -1
- data/lib/ruby/identitas/endpoints/token_status.rb +13 -0
- data/lib/ruby/identitas/main.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1c982b822e1001f522ae9f264280d0532c10598
|
4
|
+
data.tar.gz: ccd77bdcb92b19710be0bafe62c7cc4a1eb129de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 203af987f7d61ca5d732503d731aeb69ded185409e3318fffcfc85abe157ddbed50dd44d2599878b64cdeed62d9a07d7a4d1a1c247f0983efd360f93d400f9d0
|
7
|
+
data.tar.gz: 0eaed0062793d35d881e16ed91560ac13b4cc74d65c93e5814b2516ad491ba7c31167523daced70d4a37e211743867c2f2ac65364d6fac2b0a1eb24eb0d07180
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -30,12 +30,42 @@ Access API
|
|
30
30
|
|
31
31
|
```ruby
|
32
32
|
request = Ruby::Identitas::Main.new("YOUR_ACCESS_TOKEN")
|
33
|
-
request.me
|
33
|
+
response = request.me
|
34
34
|
```
|
35
35
|
|
36
36
|
## Endpoints
|
37
37
|
|
38
|
-
|
38
|
+
### me
|
39
|
+
|
40
|
+
Get detail information about user
|
41
|
+
|
42
|
+
parameters :
|
43
|
+
|
44
|
+
| name | type |
|
45
|
+
| ------------ | ------------ |
|
46
|
+
|`access_token`| query string |
|
47
|
+
|
48
|
+
example :
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
response = request.me.parsed_response
|
52
|
+
```
|
53
|
+
|
54
|
+
### token status
|
55
|
+
|
56
|
+
Check token status
|
57
|
+
|
58
|
+
parameters :
|
59
|
+
|
60
|
+
| name | type |
|
61
|
+
| ------------ | ------------ |
|
62
|
+
|`access_token`| query string |
|
63
|
+
|
64
|
+
example :
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
response = request.token_status.parsed_response
|
68
|
+
```
|
39
69
|
|
40
70
|
## Development
|
41
71
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Ruby
|
2
|
+
module Identitas
|
3
|
+
module Endpoints
|
4
|
+
module TokenStatus
|
5
|
+
def token_status(options = {})
|
6
|
+
options.merge!({access_token: @token})
|
7
|
+
endpoint = build_endpoint("/v1/token_status")
|
8
|
+
self.class.get(endpoint, query: options)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/ruby/identitas/main.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
require "ruby/identitas/endpoints/me"
|
2
|
+
require "ruby/identitas/endpoints/token_status"
|
2
3
|
|
3
4
|
module Ruby
|
4
5
|
module Identitas
|
5
6
|
class Main
|
6
7
|
include HTTParty
|
7
8
|
include Ruby::Identitas::Endpoints::Me
|
9
|
+
include Ruby::Identitas::Endpoints::TokenStatus
|
8
10
|
|
9
11
|
def initialize(token)
|
10
12
|
@base_uri = Ruby::Identitas::Api.url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-identitas-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yunanhelmy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/ruby/identitas/api/version.rb
|
91
91
|
- lib/ruby/identitas/configuration.rb
|
92
92
|
- lib/ruby/identitas/endpoints/me.rb
|
93
|
+
- lib/ruby/identitas/endpoints/token_status.rb
|
93
94
|
- lib/ruby/identitas/main.rb
|
94
95
|
- ruby-identitas-api.gemspec
|
95
96
|
- spec/dummy/.gitignore
|