kf5_api 0.1.2 → 0.1.3
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_field.rb +31 -0
- data/lib/kf5_api/version.rb +1 -1
- data/lib/kf5_api.rb +1 -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: 021bcb2f3706a298a1b08023f3940b9f9b2c78b0
|
4
|
+
data.tar.gz: e0114920cfe089c8df3a2a71f2966d955f7b2de4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f76300e19a6190c30510f03221f53fdf239126f52d403205d98dfb1e44c61a348415fa1d3c87ef8deb3e057dc50bac5db9549461078efffd55a5386813d8696b
|
7
|
+
data.tar.gz: b70113a6511e1bd9983cc2ae68d691616b20c0bfcbab7b9875d2f1fc9997b6ed5936292e19bacd7b3cd6407512e3960c85f41b7c3da4f35ee846edd7f9a05801
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Kf5Api
|
2
|
+
class UserField
|
3
|
+
extend Kf5Api::Base
|
4
|
+
private_class_method :new
|
5
|
+
# http://developer.kf5.com/restfulapi/core/user_fields/
|
6
|
+
|
7
|
+
ACTIONS_HASH = {
|
8
|
+
all: '/apiv2/user_fields',
|
9
|
+
active: '/apiv2/user_fields/active',
|
10
|
+
user_fields: '/apiv2/user_fields/%{id}'
|
11
|
+
}
|
12
|
+
|
13
|
+
class << self
|
14
|
+
# 用户自定义字段列表
|
15
|
+
def all(query_params = {})
|
16
|
+
get(ACTIONS_HASH[:all], query_params).parsed_response
|
17
|
+
end
|
18
|
+
|
19
|
+
# 获取状态为启用的自定义字段列表
|
20
|
+
def active(query_params = {})
|
21
|
+
get(ACTIONS_HASH[:active], query_params).parsed_response
|
22
|
+
end
|
23
|
+
|
24
|
+
# 查看用户自定义字段
|
25
|
+
def field_by_id(id)
|
26
|
+
action = format(ACTIONS_HASH[:user_fields], id: id)
|
27
|
+
get(action).parsed_response
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/kf5_api/version.rb
CHANGED
data/lib/kf5_api.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.3
|
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-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/kf5_api/kchat.rb
|
91
91
|
- lib/kf5_api/organization.rb
|
92
92
|
- lib/kf5_api/user.rb
|
93
|
+
- lib/kf5_api/user_field.rb
|
93
94
|
- lib/kf5_api/version.rb
|
94
95
|
homepage: https://github.com/wangrui438/kf5_api
|
95
96
|
licenses:
|