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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12fc6d4a24956a12f82f7f4e51614376929ed37f
4
- data.tar.gz: af098ecfcdda4277a5f6802ce15cd66f0f345121
3
+ metadata.gz: e1c982b822e1001f522ae9f264280d0532c10598
4
+ data.tar.gz: ccd77bdcb92b19710be0bafe62c7cc4a1eb129de
5
5
  SHA512:
6
- metadata.gz: cbceaba05f1d2e767e1ffd1a7c50e648c42e5ca43873abddc71e47916f9c221eac4d93e991ede277d46e1d2f940f0d17b26e3541ba1f32cd770b907eb5de3ebb
7
- data.tar.gz: 3b606f26a7d624bcf05a3badde8534365ab43a29cd3cca66f1d126f1aaeecb1243fdd3361a671c5395dee44126ecfef352f67156a4d6f1ca1b4c810cbb097524
6
+ metadata.gz: 203af987f7d61ca5d732503d731aeb69ded185409e3318fffcfc85abe157ddbed50dd44d2599878b64cdeed62d9a07d7a4d1a1c247f0983efd360f93d400f9d0
7
+ data.tar.gz: 0eaed0062793d35d881e16ed91560ac13b4cc74d65c93e5814b2516ad491ba7c31167523daced70d4a37e211743867c2f2ac65364d6fac2b0a1eb24eb0d07180
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-identitas-api (0.1.0)
4
+ ruby-identitas-api (0.2.0)
5
5
  httparty
6
6
 
7
7
  GEM
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
- - me
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
 
@@ -1,7 +1,7 @@
1
1
  module Ruby
2
2
  module Identitas
3
3
  module Api
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
@@ -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
@@ -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.1.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-05 00:00:00.000000000 Z
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