   end
 
   def get_toggl_projects do
-    {:toggl_projects, [%{id: 11111, name: "Sample project"}]}
+    projects = %{access_token: @toggl_api_token}
+     |> Togglex.Api.Client.new
+     |> Togglex.Api.Workspace.projects(@toggl_workspace_id)
+
+    {:toggl_projects, projects}
   end
 end

  require Logger

  @pivotal_tracker_api_token Application.get_env(:kairos, :pivotal_tracker_api_token)

  def get_projects do
    Logger.debug("Getting external projects from services")

  end

  def get_pivotal_traker_projects do
    projects = %{access_token: @pivotal_tracker_api_token}
      |> ExTracker.Client.new
      |> ExTracker.Projects.list(fields: ":default,current_velocity")

    {:pivotal_tracker_projects, projects}
  rescue
