ruby-identitas-api 0.2.0 → 0.3.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 +2 -2
- data/README.md +18 -0
- data/lib/ruby/identitas/api/version.rb +1 -1
- data/lib/ruby/identitas/endpoints/password.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: 41f57c2d6b42d84fe2986fedea63b449e388cac5
|
4
|
+
data.tar.gz: abed4c9a310110fc1d32dc5fcd218f833bdf3a1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b4617dba0806a3d86de99ec064ad977a008d0fb1103c707d2c8c443a414ef7c7a07d2bbf44c43281970e9e634a4430178267f09713deea81ac241cfee3dea43
|
7
|
+
data.tar.gz: 3df75bf6cc1efc0c5c4c91630d68593b1ade0a6bf78c7078a2282124c360ceaa7a7a951d7a8f1f259557594fc04fbbc98edeb988c74402a9d50e769c1faa759f
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-identitas-api (0.
|
4
|
+
ruby-identitas-api (0.3.0)
|
5
5
|
httparty
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.3)
|
11
|
-
httparty (0.15.
|
11
|
+
httparty (0.15.7)
|
12
12
|
multi_xml (>= 0.5.2)
|
13
13
|
multi_xml (0.6.0)
|
14
14
|
rake (10.5.0)
|
data/README.md
CHANGED
@@ -67,6 +67,24 @@ example :
|
|
67
67
|
response = request.token_status.parsed_response
|
68
68
|
```
|
69
69
|
|
70
|
+
### Chane password
|
71
|
+
|
72
|
+
Change password
|
73
|
+
|
74
|
+
parameters :
|
75
|
+
|
76
|
+
| name | type |
|
77
|
+
| ------------ | ------------ |
|
78
|
+
|`access_token`| query string |
|
79
|
+
|`password`| query string |
|
80
|
+
|`password_confirmation`| query string |
|
81
|
+
|
82
|
+
example :
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
response = request.password({password: "mys3cret", password_confirmation: "mys3cret"}).parsed_response
|
86
|
+
```
|
87
|
+
|
70
88
|
## Development
|
71
89
|
|
72
90
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Ruby
|
2
|
+
module Identitas
|
3
|
+
module Endpoints
|
4
|
+
module Password
|
5
|
+
def password(options = {})
|
6
|
+
options.merge!({access_token: @token})
|
7
|
+
endpoint = build_endpoint("/v1/me/password")
|
8
|
+
self.class.post(endpoint, query: options)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/ruby/identitas/main.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "ruby/identitas/endpoints/me"
|
2
2
|
require "ruby/identitas/endpoints/token_status"
|
3
|
+
require "ruby/identitas/endpoints/password"
|
3
4
|
|
4
5
|
module Ruby
|
5
6
|
module Identitas
|
@@ -7,6 +8,7 @@ module Ruby
|
|
7
8
|
include HTTParty
|
8
9
|
include Ruby::Identitas::Endpoints::Me
|
9
10
|
include Ruby::Identitas::Endpoints::TokenStatus
|
11
|
+
include Ruby::Identitas::Endpoints::Password
|
10
12
|
|
11
13
|
def initialize(token)
|
12
14
|
@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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yunanhelmy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-29 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/password.rb
|
93
94
|
- lib/ruby/identitas/endpoints/token_status.rb
|
94
95
|
- lib/ruby/identitas/main.rb
|
95
96
|
- ruby-identitas-api.gemspec
|