getListNames() {
+ return lists.stream()
+ .map(TList::getName);
+ }
+
+ public TrelloCard getCard(String cardId) {
+ Card card = trello.getCard(cardId);
+ return TrelloCard.from(card, trello);
+ }
+}
diff --git a/src/main/java/net/kemitix/trello/TrelloCard.java b/src/main/java/net/kemitix/trello/TrelloCard.java
new file mode 100644
index 0000000..3a0ccff
--- /dev/null
+++ b/src/main/java/net/kemitix/trello/TrelloCard.java
@@ -0,0 +1,43 @@
+package net.kemitix.trello;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.julienvey.trello.Trello;
+import com.julienvey.trello.domain.Card;
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class TrelloCard extends Card {
+
+ private boolean dueComplete;
+
+ public static TrelloCard from(Card card, Trello trello) {
+ TrelloCard s = new TrelloCard();
+ s.setInternalTrello(trello);
+ s.setId(card.getId());
+ s.setName(card.getName());
+ s.setIdList(card.getIdList());
+ s.setDesc(card.getDesc());
+ s.setUrl(card.getUrl());
+ s.setDue(card.getDue());
+ s.setIdMembers(card.getIdMembers());
+ s.setLabels(card.getLabels());
+ s.setBadges(card.getBadges());
+ s.setCheckItemStates(card.getCheckItemStates());
+ s.setClosed(card.isClosed());
+ s.setDateLastActivity(card.getDateLastActivity());
+ s.setIdBoard(card.getIdBoard());
+ s.setIdChecklists(card.getIdChecklists());
+ s.setIdMembersVoted(card.getIdMembersVoted());
+ s.setIdShort(card.getIdShort());
+ s.setIdAttachmentCover(card.getIdAttachmentCover());
+ s.setManualCoverAttachment(card.isManualCoverAttachment());
+ s.setPos(card.getPos());
+ s.setShortLink(card.getShortLink());
+ s.setShortUrl(card.getShortUrl());
+ s.setSubscribed(card.isSubscribed());
+ return s;
+ }
+}
diff --git a/src/main/java/net/kemitix/trello/TrelloClient.java b/src/main/java/net/kemitix/trello/TrelloClient.java
new file mode 100644
index 0000000..24d5d7a
--- /dev/null
+++ b/src/main/java/net/kemitix/trello/TrelloClient.java
@@ -0,0 +1,7 @@
+package net.kemitix.trello;
+
+import com.julienvey.trello.Trello;
+
+public interface TrelloClient
+ extends Trello {
+}
diff --git a/src/main/java/net/kemitix/trello/TrelloConfig.java b/src/main/java/net/kemitix/trello/TrelloConfig.java
new file mode 100644
index 0000000..1699df6
--- /dev/null
+++ b/src/main/java/net/kemitix/trello/TrelloConfig.java
@@ -0,0 +1,48 @@
+package net.kemitix.trello;
+
+public interface TrelloConfig {
+
+ /**
+ * The Trello Developer API Key.
+ *
+ * https://trello.com/app-key
+ */
+ String getTrelloKey();
+
+ /**
+ * The Trello Developer API Key Token.
+ *
+ * https://trello.com/app-key
+ */
+ String getTrelloSecret();
+
+ /**
+ * The name of the user with access to the Trello Slush Pile Board.
+ */
+ String getUserName();
+
+ /**
+ * The trello board containing the Slush Pile.
+ */
+ String getBoardName();
+
+ /**
+ * The email address to send submission attachments to.
+ *
+ * e.g. the kindle address
+ */
+ String getSender();
+
+ /**
+ * The email address to send emails from.
+ *
+ * If sending to Kindle, then ensure this address is listed as a valid sender.
+ */
+ String getReader();
+
+ /**
+ * The URL of the Webhook to register with services.
+ */
+ String getWebhook();
+
+}
diff --git a/src/main/java/net/kemitix/trello/TrelloProducers.java b/src/main/java/net/kemitix/trello/TrelloProducers.java
new file mode 100644
index 0000000..a4435ec
--- /dev/null
+++ b/src/main/java/net/kemitix/trello/TrelloProducers.java
@@ -0,0 +1,38 @@
+package net.kemitix.trello;
+
+import com.julienvey.trello.Trello;
+import com.julienvey.trello.TrelloHttpClient;
+import com.julienvey.trello.domain.Member;
+import com.julienvey.trello.impl.http.JDKTrelloHttpClient;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+
+@ApplicationScoped
+public class TrelloProducers {
+
+ @Produces
+ @ApplicationScoped
+ TrelloHttpClient trelloHttpClient() {
+ return new JDKTrelloHttpClient();
+ }
+
+ @Produces
+ @ApplicationScoped
+ TrelloClient trello(
+ TrelloConfig config,
+ TrelloHttpClient httpClient
+ ) {
+ return new KemitixTrelloClient(
+ config.getTrelloKey(),
+ config.getTrelloSecret(),
+ httpClient);
+ }
+
+ @Produces
+ @ApplicationScoped
+ Member member(Trello trello, TrelloConfig trelloConfig) {
+ return trello.getMemberInformation(trelloConfig.getUserName());
+ }
+
+}
diff --git a/src/main/resources/META-INF/beans.xml b/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..e69de29