trell 0.0.1 → 0.0.2
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 +9 -6
- data/lib/trell/client.rb +2 -0
- data/lib/trell/client/boards.rb +6 -4
- data/lib/trell/client/members.rb +2 -1
- data/lib/trell/client/organizations.rb +25 -0
- data/lib/trell/version.rb +1 -1
- 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: 09c7ae034c0600a4b6c7c1e031486a1395e71694
|
4
|
+
data.tar.gz: 66ca4b04f741a898253f0beeeee0654c0d306efc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0777023486c4f49cd1e184dcf8872c1a3ae9d331b766485ed84083479f6424a3c788bd0bf2bbe0a62674ad1876a21a736cee92c3d627559db0a4873b57509610
|
7
|
+
data.tar.gz: 17d9d3019013bac3ba37d6e7cfdd8002be543153c936dc4b1a3e9a409a4727d290e85bf129fca0ebe32418be65d61c180ef24030585f05002277bf93267e09a0
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Trell
|
2
2
|
=====
|
3
3
|
|
4
|
+
Simple Ruby wrapper for <img src="https://d2k1ftgv7pobq7.cloudfront.net/images/bd87ee916375920ae72dffadbb10d412/logo-blue-lg.png" width="50">API. API documentation: https://trello.com/docs/api
|
5
|
+
|
4
6
|
[][gem]
|
5
7
|
[][travis]
|
6
8
|
[][gemnasium]
|
@@ -13,8 +15,6 @@ Trell
|
|
13
15
|
[codeclimate]: https://codeclimate.com/github/linyows/trell
|
14
16
|
[coveralls]: https://coveralls.io/r/linyows/trell
|
15
17
|
|
16
|
-
Simple Ruby wrapper for <img src="https://d2k1ftgv7pobq7.cloudfront.net/images/bd87ee916375920ae72dffadbb10d412/logo-blue-lg.png" width="70">API. API documentation: https://trello.com/docs/api
|
17
|
-
|
18
18
|
Installation
|
19
19
|
------------
|
20
20
|
|
@@ -37,18 +37,21 @@ Reading public data
|
|
37
37
|
|
38
38
|
```ruby
|
39
39
|
member = Trell.member 'foo'
|
40
|
-
member.fullName
|
41
40
|
=> #<Sawyer::Resource:0x007f971230f538
|
41
|
+
member.fullName
|
42
|
+
=> "foo123456"
|
42
43
|
```
|
43
44
|
|
44
45
|
Authentication
|
45
46
|
--------------
|
46
47
|
|
47
|
-
Generate a application key and application token
|
48
|
+
Generate a application key and a application token
|
48
49
|
|
49
50
|
```ruby
|
50
|
-
`open #{Trell.key_generator}`
|
51
|
-
|
51
|
+
`open #{Trell.key_generator}`
|
52
|
+
#=> get application key by browser
|
53
|
+
`open #{Trell.token_generator}`
|
54
|
+
#=> get application token by browser
|
52
55
|
|
53
56
|
Trell.configure do |c|
|
54
57
|
c.application_key = '429452e37b7eb23182ec12**********'
|
data/lib/trell/client.rb
CHANGED
@@ -2,6 +2,7 @@ require 'sawyer'
|
|
2
2
|
require 'trell/configurable'
|
3
3
|
require 'trell/authentication'
|
4
4
|
require 'trell/client/members'
|
5
|
+
require 'trell/client/organizations'
|
5
6
|
require 'trell/client/boards'
|
6
7
|
require 'trell/client/cards'
|
7
8
|
require 'trell/client/lists'
|
@@ -13,6 +14,7 @@ module Trell
|
|
13
14
|
include Trell::Authentication
|
14
15
|
include Trell::Configurable
|
15
16
|
include Trell::Client::Members
|
17
|
+
include Trell::Client::Organizations
|
16
18
|
include Trell::Client::Boards
|
17
19
|
include Trell::Client::Cards
|
18
20
|
include Trell::Client::Lists
|
data/lib/trell/client/boards.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
module Trell
|
2
2
|
class Client
|
3
3
|
module Boards
|
4
|
-
def
|
5
|
-
get
|
4
|
+
def member_boards(username, options = {})
|
5
|
+
get "members/#{username}/boards", options
|
6
6
|
end
|
7
|
+
alias_method :boards, :member_boards
|
7
8
|
|
8
|
-
def
|
9
|
-
get "
|
9
|
+
def organization_boards(name, options = {})
|
10
|
+
get "organizations/#{name}/boards", options
|
10
11
|
end
|
12
|
+
alias_method :org_boards, :organization_boards
|
11
13
|
|
12
14
|
def create_board(options = {})
|
13
15
|
post 'boards', options
|
data/lib/trell/client/members.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module Trell
|
2
2
|
class Client
|
3
3
|
module Members
|
4
|
-
def
|
4
|
+
def board_members(board_id, options = {})
|
5
5
|
get "boards/#{board_id}/members", options
|
6
6
|
end
|
7
|
+
alias_method :mebers, :board_members
|
7
8
|
|
8
9
|
def member(member, options = {})
|
9
10
|
get "members/#{member}", options
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Trell
|
2
|
+
class Client
|
3
|
+
module Organizations
|
4
|
+
def create_organization(name, options = {})
|
5
|
+
post "organizations/#{name}", options
|
6
|
+
end
|
7
|
+
alias_method :create_org, :create_organization
|
8
|
+
|
9
|
+
def organization(name, options = {})
|
10
|
+
get "organizations/#{name}", options
|
11
|
+
end
|
12
|
+
alias_method :org, :organization
|
13
|
+
|
14
|
+
def update_organization(name, options = {})
|
15
|
+
put "organizations/#{name}", options
|
16
|
+
end
|
17
|
+
alias_method :update_org, :update_organization
|
18
|
+
|
19
|
+
def delete_organization(name, options = {})
|
20
|
+
delete "organizations/#{name}", options
|
21
|
+
end
|
22
|
+
alias_method :delete_org, :delete_organization
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/trell/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linyows
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sawyer
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/trell/client/labels.rb
|
75
75
|
- lib/trell/client/lists.rb
|
76
76
|
- lib/trell/client/members.rb
|
77
|
+
- lib/trell/client/organizations.rb
|
77
78
|
- lib/trell/client/tokens.rb
|
78
79
|
- lib/trell/configurable.rb
|
79
80
|
- lib/trell/version.rb
|