trell 0.0.1 → 0.0.2

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: 3601d4f9ca2ab5fd25aed1943ab321a6d5709d54
4
- data.tar.gz: 072bcd28f5f0dae310d7adcf2a8bd5ecf13d962b
3
+ metadata.gz: 09c7ae034c0600a4b6c7c1e031486a1395e71694
4
+ data.tar.gz: 66ca4b04f741a898253f0beeeee0654c0d306efc
5
5
  SHA512:
6
- metadata.gz: d8b06012dacd50a03d10c570bfa91abea1feb3e74cd05a0b562d7bd113518c277a5bf666d197c3511413ddd5cef794a8df0b3c003f7f6ae0fc1622c6e3cef0ec
7
- data.tar.gz: a7ba3b14741afe45e36048a116876294ec19cbb6643878629801b9dba6667ff04be4af2a315150dcd3a917f7cc443eb4153bdb8ba343109270897566d231a575
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 Version](https://badge.fury.io/rb/trell.png)][gem]
5
7
  [![Build Status](https://secure.travis-ci.org/linyows/trell.png?branch=master)][travis]
6
8
  [![Dependency Status](https://gemnasium.com/linyows/trell.png?travis)][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}` #=> get application key
51
- `open #{Trell.token_generator}` #=> get application token
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
@@ -1,13 +1,15 @@
1
1
  module Trell
2
2
  class Client
3
3
  module Boards
4
- def all_boards(options = {})
5
- get 'boards', options
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 boards(username, options = {})
9
- get "members/#{username}/boards", options
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
@@ -1,9 +1,10 @@
1
1
  module Trell
2
2
  class Client
3
3
  module Members
4
- def members(board_id, options = {})
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
@@ -1,3 +1,3 @@
1
1
  module Trell
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
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.1
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-08 00:00:00.000000000 Z
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