trello_client 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de5ce9fb7f6635d3d0d175d0feb1c7e1dd35c95b
4
- data.tar.gz: d0e45f7157b0933a7846be8c2631fafff20b258f
3
+ metadata.gz: c3a56fdb88755c8a63ce070b77bcf515b6f7a136
4
+ data.tar.gz: e373a2f9362d7108b0eb50c6a616de587e9e345a
5
5
  SHA512:
6
- metadata.gz: f2ec180f6b8da906ee90ff016bc1d9372ad1bdef7a3412949cc8a5a1abbc85569faea6b4d6d4848c23cd435b613d645614813d53c17f8689331b61aa06e7d7b4
7
- data.tar.gz: bd80dc221b9386672632ff2591bba2a0f4f1788a9d0d52cd7641e4e4d0d3f37d586724918906e378d234bf32f07695f44a035b2e74949b1a55ed60ce15de729d
6
+ metadata.gz: 769d40c2a7d29293853d0cea7984301d2fa5ef6e11bd170d7875114464ca13136b0a78fcd503b48fd7b37a357c6e6295ab0b85a757c5a93459867a8a957022ca
7
+ data.tar.gz: 3f44cc5c6e2775cfe20d72011006f9a7b3bb47538cc258242f04c0dc03b8f4b7dceee37d0b1c7bdf82b843ed7abfddf735ee36eee5e910f7330dcff79897df3a
data/lib/trello/client.rb CHANGED
@@ -3,7 +3,6 @@ require "trello/net_http_client"
3
3
  module Trello
4
4
  class Client
5
5
  BASE_URL = "https://api.trello.com"
6
- VERSION = "0.1.3"
7
6
 
8
7
  def initialize(key:, token:)
9
8
  raise unless key && token
@@ -0,0 +1,25 @@
1
+ module Trello
2
+ class List
3
+ def initialize(client)
4
+ @client = client
5
+ end
6
+
7
+ def fetch_all(board_id:)
8
+ @client.get(lists_url(board_id))
9
+ end
10
+
11
+ def fetch(id)
12
+ @client.get(list_url(id))
13
+ end
14
+
15
+ private
16
+
17
+ def lists_url(board_id)
18
+ "/1/boards/#{board_id}/lists"
19
+ end
20
+
21
+ def list_url(id)
22
+ "/1/lists/#{id}"
23
+ end
24
+ end
25
+ end
data/lib/trello_client.rb CHANGED
@@ -4,6 +4,8 @@ require "net/https"
4
4
 
5
5
  require "trello/client"
6
6
  require "trello/board"
7
+ require "trello/list"
7
8
 
8
9
  module TrelloClient
10
+ VERSION = "0.1.4"
9
11
  end
@@ -1,10 +1,10 @@
1
1
  lib = File.expand_path("../lib", __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "trello/client"
3
+ require "trello_client"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "trello_client"
7
- spec.version = Trello::Client::VERSION
7
+ spec.version = TrelloClient::VERSION
8
8
  spec.authors = ["Chen Huang"]
9
9
  spec.email = ["alan.tolearn@gmail.com"]
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trello_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chen Huang
@@ -83,6 +83,7 @@ files:
83
83
  - bin/setup
84
84
  - lib/trello/board.rb
85
85
  - lib/trello/client.rb
86
+ - lib/trello/list.rb
86
87
  - lib/trello/net_http_client.rb
87
88
  - lib/trello_client.rb
88
89
  - trello_client.gemspec