trello_client_lite 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/VERSION +1 -1
  4. data/lib/trello/client.rb +14 -12
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c26b527d461296dd8c259a4f9322a9c1c17c9b95bcd43af9d2a67911f1b724f
4
- data.tar.gz: 8ed0c05c58aeb710621f93223150ded5b054ba802138422b647f26afb29c9541
3
+ metadata.gz: 99d60d1021eb4d9021668f06c9c806e70980d0b3b6b2e10808ebb108c23f78ea
4
+ data.tar.gz: 7bb1c97a86f1b03d6021a4af5c1499584c266de0af304c8be52f1a201cbf62cf
5
5
  SHA512:
6
- metadata.gz: 0ec3eb2d4c7fb728722af330c73678e3701f7261af61cc3f393462135bde3b505c6b4eafc1a8e690a8592a2ceb5130d8e4cec1ce12f2f41d484d84fdbc0e67a2
7
- data.tar.gz: 200c9934aa0654173406654baeaa0cf6c683b196e3dd4f439c1256406f194e8fa23492ce30a894dc8af146f87071f2670663d502bd25b9563cb1048007163462
6
+ metadata.gz: 4efd2449593078dd2469ae0f91055f765da307c3606a57e04e993d7d8a0814db140e07e70a67124144a85e6826277f2536585932211ddbae0a84613f0cd4beb2
7
+ data.tar.gz: f6feee6c593a0d79e86faf78a0d547b8a124a1dd55ae0f904051945aeef9c04b957de5f5694563e3c608c6c9c795dc3abddaa00fb74bfa7e28eadaebf6cd4f6b
data/README.md CHANGED
@@ -7,6 +7,10 @@
7
7
  A simple gem for interacting with basic endpoints of the Trello RestAPI.
8
8
  <https://rubygems.org/gems/trello_client_lite>
9
9
 
10
+ ## Tracking
11
+
12
+ Track this project on the following trello board: <https://trello.com/b/TLbMg2RX/trelloclientlite>
13
+
10
14
  ## Installation
11
15
 
12
16
  Add this line to your application's Gemfile:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -34,22 +34,24 @@ module Trello
34
34
  get_labels_for_board(board_id: board_id).select { |value| value['name'] == label_name }.first
35
35
  end
36
36
 
37
- # rubocop:disable Metrics/MethodLength
38
37
  def add_card!(list_id:, title:, description: nil, labels: nil)
39
- options = {
40
- query: {
41
- key: key,
42
- token: token,
43
- idList: list_id,
44
- name: title,
45
- desc: description,
46
- idLabels: labels
47
- }
48
- }
38
+ options = { query: { key: key, token: token, idList: list_id, name: title, desc: description, idLabels: labels } }
49
39
 
50
40
  request('cards') { |url| HTTParty.post(url, options) }
51
41
  end
52
- # rubocop:enable Metrics/MethodLength
42
+
43
+ def add_card_by_name!(board_name:, list_name:, label_name:, title:, description: nil)
44
+ board_id = get_board_by_name(name: board_name)['id']
45
+ list_id = get_list(board_id: board_id, list_name: list_name)['id']
46
+ label_id = get_label(board_id: board_id, label_name: label_name)['id']
47
+
48
+ add_card!(
49
+ list_id: list_id,
50
+ title: title,
51
+ description: description,
52
+ labels: label_id
53
+ )
54
+ end
53
55
 
54
56
  def boards
55
57
  options = { query: { key: key, token: token } }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trello_client_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-11 00:00:00.000000000 Z
11
+ date: 2020-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler