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.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/VERSION +1 -1
- data/lib/trello/client.rb +14 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99d60d1021eb4d9021668f06c9c806e70980d0b3b6b2e10808ebb108c23f78ea
|
4
|
+
data.tar.gz: 7bb1c97a86f1b03d6021a4af5c1499584c266de0af304c8be52f1a201cbf62cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
1
|
+
2.1.0
|
data/lib/trello/client.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
11
|
+
date: 2020-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|