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 +4 -4
- data/lib/kf5_api/user.rb +7 -0
- data/lib/kf5_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c3b953388e65122ecb6b71beec1eb04f621cad2
|
4
|
+
data.tar.gz: e78c57aa3596dead3bd9fcc82f0bb97d032473d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f978969573afd8b793336c7583c624c5ab5faa3f47901208d27702461128db25e7f6d247e293840075c41340b9353e1286f52a6f15928626582d802372cf1e01
|
7
|
+
data.tar.gz: 59f5eda113e44aed707fcfd376b5f5fb9ef24d320fbd667987a9125b74815a16c5d51587eb3959b516d19ce652dec00d59611dc8fb01d6f445be26562f69cf9c
|
data/lib/kf5_api/user.rb
CHANGED
@@ -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)
|
data/lib/kf5_api/version.rb
CHANGED
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
|
+
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
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|