ruby-identitas-api 0.4.0 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52b5d497b207f2c9f3ebdf44858a923d097d1280
4
- data.tar.gz: b8a458d56f15e8a51b8b2d55a7fa788ebbad975a
3
+ metadata.gz: fac6dbbe1a01fd4f0cc2423606ee88238abb7ef0
4
+ data.tar.gz: 561d21750ffc7f2714a58f2b571d6a26688d2872
5
5
  SHA512:
6
- metadata.gz: adec8a00e6c8c812428bdbcdaf901c4686cafb6a74059baa7e6613617a4f889556de736c04283e957736dcea50a965ce52e1911177a5df0d3219da06dc86c366
7
- data.tar.gz: '0028420f47647fc756d0f497277a4959e31ef95220144656ed2dc16a043850723efc423da07f7bec1b27369e4428fd08b37ad7e9d89b06b296b50077ed561a78'
6
+ metadata.gz: 71a0fc39b27937bf6d3d37986a39c9e453312b92c0826512e4480468f60f87dd1c7fd939d804a6da86b9a9b50c8b327edab1d79cc6b101dd0fcfb52807650cc2
7
+ data.tar.gz: 8d0f296da1033fb18e1d80b856bd945692a7fea97b5a7644e8c42390b9c51aee3f2219a8a67bade265dd87c62af87f0e86442c7d14261b0f94a2c2219600a8dc
data/README.md CHANGED
@@ -51,6 +51,38 @@ example :
51
51
  response = request.me.parsed_response
52
52
  ```
53
53
 
54
+ ### my invitations
55
+
56
+ Get my invitations
57
+
58
+ parameters :
59
+
60
+ | name | type |
61
+ | ------------ | ------------ |
62
+ |`access_token`| query string |
63
+
64
+ example :
65
+
66
+ ```ruby
67
+ response = request.my_invitations.parsed_response
68
+ ```
69
+
70
+ ### my invitations count
71
+
72
+ Get my invitations count
73
+
74
+ parameters :
75
+
76
+ | name | type |
77
+ | ------------ | ------------ |
78
+ |`access_token`| query string |
79
+
80
+ example :
81
+
82
+ ```ruby
83
+ response = request.my_invitations_count.parsed_response
84
+ ```
85
+
54
86
  ### token status
55
87
 
56
88
  Check token status
@@ -106,6 +138,23 @@ example :
106
138
  response = request.create_user({email: "m.yunan.helmy@gmail.com", first_name: "Yunan", last_name: "Helmy", password: "mys3cret", password_confirmation: "mys3cret"}).parsed_response
107
139
  ```
108
140
 
141
+ ### Invite user
142
+
143
+ Invite user
144
+
145
+ parameters :
146
+
147
+ | name | type |
148
+ | ------------ | ------------ |
149
+ |`access_token`| query string |
150
+ |`email`| query string |
151
+
152
+ example :
153
+
154
+ ```ruby
155
+ response = request.invite_user({email: "m.yunan.helmy@gmail.com"}).parsed_response
156
+ ```
157
+
109
158
  ## Development
110
159
 
111
160
  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.
@@ -1,7 +1,7 @@
1
1
  module Ruby
2
2
  module Identitas
3
3
  module Api
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
6
6
  end
7
7
  end
@@ -7,6 +7,19 @@ module Ruby
7
7
  endpoint = build_endpoint("/v1/me")
8
8
  self.class.get(endpoint, query: options)
9
9
  end
10
+
11
+ def my_invitations(options = {})
12
+ options.merge!({access_token: @token})
13
+ endpoint = build_endpoint("/v1/me/invitations")
14
+ self.class.get(endpoint, query: options)
15
+ end
16
+
17
+ def my_invitations_count(options = {})
18
+ options.merge!({access_token: @token})
19
+ endpoint = build_endpoint("/v1/me/invitations/count")
20
+ self.class.get(endpoint, query: options)
21
+ end
22
+
10
23
  end
11
24
  end
12
25
  end
@@ -7,6 +7,13 @@ module Ruby
7
7
  endpoint = build_endpoint("/v1/users")
8
8
  self.class.post(endpoint, query: options)
9
9
  end
10
+
11
+ def invite_user(options = {})
12
+ options.merge!({access_token: @token})
13
+ endpoint = build_endpoint("/v1/users/invite")
14
+ self.class.post(endpoint, query: options)
15
+ end
16
+
10
17
  end
11
18
  end
12
19
  end
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.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yunanhelmy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-29 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty