backlog_jp 0.0.7 → 0.0.8
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 +4 -4
- data/README.md +17 -16
- data/lib/backlog_jp/client.rb +2 -6
- data/lib/backlog_jp/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: d2e797e9b65c70348d8e4429b9d085da3a0ec294
|
4
|
+
data.tar.gz: 6693a706708d14cd04e5995a0623faae675a6b30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d43d70d23715a20cee7a7e81d91a92ceadf9eda230baa4dcd282ee140fa607950019b8533c58467207b690f032c7dadf1c2a0e122b3501f2c92bb2a2665200fc
|
7
|
+
data.tar.gz: 57d2209fc096e7fd9a3b15fc622d3ea5c42ee6b4a3a9de193ef9ca4da8c81aa3ca2ea978b8db42799444ed1823904df94ad249890e55b6dfaf278065359070f8
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
**!!!WORK IN PROGRESS!!!**
|
4
4
|
|
5
|
-
A
|
5
|
+
A Ruby client for [Backlog.jp API V2](http://developer.nulab-inc.com/ja/docs/backlog/api/2/).
|
6
6
|
|
7
7
|
## Requirements
|
8
8
|
|
@@ -28,27 +28,28 @@ TODO: Write more usage instructions here
|
|
28
28
|
|
29
29
|
require "backlog_jp"
|
30
30
|
|
31
|
-
#
|
32
|
-
BacklogJp.
|
33
|
-
config.space = ENV["BACKLOG_SPACE"]
|
34
|
-
config.username = ENV["BACKLOG_USERNAME"]
|
35
|
-
config.password = ENV["BACKLOG_PASSWORD"]
|
36
|
-
end
|
31
|
+
# Create client with your space name and api key.
|
32
|
+
client = BacklogJp::Client.new space: "my-space", api_key: "xxxxxxxxxx"
|
37
33
|
|
38
|
-
|
34
|
+
# http://developer.nulab-inc.com/ja/docs/backlog/api/2/get-space
|
35
|
+
client.get "space"
|
39
36
|
|
40
|
-
|
41
|
-
|
37
|
+
# http://developer.nulab-inc.com/ja/docs/backlog/api/2/get-project
|
38
|
+
client.get "projects/MYPJ"
|
42
39
|
|
43
|
-
|
44
|
-
|
45
|
-
project.save # Save changed attribute
|
40
|
+
# http://developer.nulab-inc.com/ja/docs/backlog/api/2/get-issues
|
41
|
+
client.get "issues", "projectId[]": 12345678
|
46
42
|
|
47
|
-
|
48
|
-
client.
|
43
|
+
# http://developer.nulab-inc.com/ja/docs/backlog/api/2/get-comments
|
44
|
+
client.get "issues/MYPJ-123/comments"
|
45
|
+
|
46
|
+
# http://developer.nulab-inc.com/ja/docs/backlog/api/2/post-comments
|
47
|
+
client.post "issues/MYPJ-123/comments", content: "hello"
|
48
|
+
|
49
|
+
# http://developer.nulab-inc.com/ja/docs/backlog/api/2/update-issue
|
50
|
+
client.patch "issues/MYPJ-123", statusId: 4
|
49
51
|
|
50
52
|
# etc...
|
51
|
-
# work in progress
|
52
53
|
|
53
54
|
## Contributing
|
54
55
|
|
data/lib/backlog_jp/client.rb
CHANGED
@@ -19,7 +19,7 @@ class BacklogJp::Client
|
|
19
19
|
api_path, params = *args
|
20
20
|
params ||= {}
|
21
21
|
|
22
|
-
response = connection.send(method, "
|
22
|
+
response = connection.send(method, "#{api_path}?apiKey=#{@api_key}", build_params(params))
|
23
23
|
|
24
24
|
unless response.status.to_s.start_with? "2"
|
25
25
|
fail APIException, JSON.parse(response.body, symbolize_names: true)
|
@@ -32,11 +32,7 @@ class BacklogJp::Client
|
|
32
32
|
private
|
33
33
|
|
34
34
|
def connection
|
35
|
-
@connection ||= Faraday.new
|
36
|
-
end
|
37
|
-
|
38
|
-
def host
|
39
|
-
@host ||= "https://#{@space}.backlog.jp"
|
35
|
+
@connection ||= Faraday.new "https://#{@space}.backlog.jp/api/v2/"
|
40
36
|
end
|
41
37
|
|
42
38
|
def camelize string
|
data/lib/backlog_jp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backlog_jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- y13i
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|