kf5_api 0.1.4 → 0.1.5

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: 36977e52da8bba66c0448dd5735af2df9b0e750c
4
- data.tar.gz: 02dcc9daabfe66b7c0ffbef52ff67c8e966acccc
3
+ metadata.gz: 5c3b953388e65122ecb6b71beec1eb04f621cad2
4
+ data.tar.gz: e78c57aa3596dead3bd9fcc82f0bb97d032473d8
5
5
  SHA512:
6
- metadata.gz: 38caf766baf959535f2f2f59788ffd55662fe09e3ebbbe407b54871556ae5a274c03dd0f813aac6d2a86b57e082022619108c1e16c367e4058aa36a44e06f316
7
- data.tar.gz: c68ba513a8a1b221291dece4d3cc5afbee92b7034fc805018fcbfda11325d3dc93b0890ff4a8620027573f6d888503ea5d7a34a45d7cbc5b7f4fbf15025bb43d
6
+ metadata.gz: f978969573afd8b793336c7583c624c5ab5faa3f47901208d27702461128db25e7f6d247e293840075c41340b9353e1286f52a6f15928626582d802372cf1e01
7
+ data.tar.gz: 59f5eda113e44aed707fcfd376b5f5fb9ef24d320fbd667987a9125b74815a16c5d51587eb3959b516d19ce652dec00d59611dc8fb01d6f445be26562f69cf9c
@@ -5,12 +5,19 @@ module Kf5Api
5
5
  # http://developer.kf5.com/restfulapi/core/users
6
6
 
7
7
  ACTIONS_HASH = {
8
+ users: '/apiv2/users',
8
9
  users_by_org: '/apiv2/organizations/%{id}/users',
9
10
  edit: '/apiv2/users/%{id}',
10
11
  search: '/apiv2/users/search'
11
12
  }
12
13
 
13
14
  class << self
15
+ # 获取用户列表
16
+ def users(query_params = {})
17
+ action = ACTIONS_HASH[:users]
18
+ get(action, query_params).parsed_response
19
+ end
20
+
14
21
  # 获取某个组织下的所有用户
15
22
  def users_by_organization(org_id, query_params = {})
16
23
  action = format(ACTIONS_HASH[:users_by_org], id: org_id)
@@ -1,3 +1,3 @@
1
1
  module Kf5Api
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kf5_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - wangrui
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-27 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler