package com.blocksolid.okrello.api;

import com.blocksolid.okrello.model.TrelloCard;
import com.blocksolid.okrello.model.TrelloList;

import java.util.ArrayList;

import retrofit.Call;
import retrofit.http.GET;
import retrofit.http.Path;
import retrofit.http.Query;

/**
 * Created by Dan Buckland on 30/11/2015.
 */
public interface TrelloApi {
    public static final String BASE_URL = "https://api.trello.com/1/";
    public static final String KEY = "cf2308ac2c68ab9a54037478108439e4";

    // Request method and URL specified in the annotation
    // Callback for the parsed response is the last parameter

    // Get lists from board
    @GET("boards/{boardId}/lists")
    Call<ArrayList<TrelloList>> getLists(@Path("boardId") String boardId,
                                         @Query("key") String key,
                                         @Query("fields") String fields);

    // Get cards from list
    @GET("lists/{listId}/cards")
    Call<ArrayList<TrelloCard>> getCards(@Path("listId") String listId,
                                         @Query("key") String key,
                                         @Query("fields") String fields);
}

@@ -78,16 +78,122 @@
 loCard;%0A
+import com.blocksolid.okrello.model.TrelloCheckItem;%0Aimport com.blocksolid.okrello.model.TrelloChecklist;%0A
 import c
@@ -228,24 +228,24 @@
 TrelloList;%0A
-
 %0Aimport java
@@ -738,16 +738,53 @@
 om board
+ to use as time periods e.g. quarters
 %0A    @GE
@@ -1053,16 +1053,31 @@
 rom list
+ to use as OKRs
 %0A    @GE
@@ -1315,10 +1315,736 @@
 ields);%0A
+%0A%0A    // Get checklists from card to identify Key Results%0A    @GET(%22cards/%7BcardId%7D/checklists?checkItems=none%22)%0A    Call%3CArrayList%3CTrelloChecklist%3E%3E getChecklists(@Path(%22cardId%22) String cardId,%0A                                                   @Query(%22key%22) String key,%0A                                                   @Query(%22fields%22) String fields);%0A%0A    // Get checkItems from specified checklist to use as Key Results%0A    @GET(%22checklists/%7BchecklistId%7D/checkItems%22)%0A    Call%3CArrayList%3CTrelloCheckItem%3E%3E getCheckItems(@Path(%22checklistId%22) String checklistId,%0A                                                   @Query(%22key%22) String key,%0A                                                   @Query(%22fields%22) String fields);%0A
 %7D%0A

Add required get checklists and get checkitems network calls to TrelloApi class