Skip to content

Commit e6f748c

Browse files
author
Chris Howe
committed
support labels with name
1 parent 2a2c684 commit e6f748c

File tree

3 files changed

+10
-33
lines changed

3 files changed

+10
-33
lines changed

src/main/java/com/julienvey/trello/domain/Label.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ public class Label extends TrelloEntity {
88
private String color;
99
private String name;
1010

11+
public Label() {
12+
}
13+
14+
public Label(String value) {
15+
String[] parts = value.split(",", 2);
16+
color = parts[0].trim();
17+
if(parts.length>1) name = parts[1].trim();
18+
}
19+
1120
/* Accessors */
1221
public String getColor() {
1322
return color;

src/main/java/com/julienvey/trello/impl/TrelloImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.julienvey.trello.TrelloHttpClient;
55
import com.julienvey.trello.domain.*;
66
import com.julienvey.trello.impl.domaininternal.Comment;
7-
import com.julienvey.trello.impl.domaininternal.Label;
7+
import com.julienvey.trello.domain.Label;
88
import com.julienvey.trello.impl.http.RestTemplateHttpClient;
99
import org.slf4j.Logger;
1010
import org.slf4j.LoggerFactory;

src/main/java/com/julienvey/trello/impl/domaininternal/Label.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)