   (erase-buffer)
   (insert (format "%s" data))
   (pop-to-buffer (current-buffer))))
-
-(defun get-account-id ()
-  (let (profile-id)
-    (call-pivotal-api
-     "GET"
-     "me"
-     (lambda (data)
-       (setq profile-id (assoc-default 'id (json-read-from-string data)))))
-    profile-id))
 
 (defun update-pivotal-story (project name params)
   (let ((story-id (get-or-create-story-id project name)))

                          (assoc-default 'general_problem jdata))))))
    pivotal-api-result))

(defun get-project-id (project)
  (call-pivotal-api
   "GET"
   "projects"
   (lambda (data)
     (extract-project-id-from-data project data))))

(defun extract-stories (data)
  (coerce
   (assoc-default 'stories
                  (assoc-default 'stories
                                 (json-read-from-string data)))
   'list))

(defun extract-names-from-stories (stories)
  (--map (assoc-default 'name it)
         stories))

(defun extract-ids-from-stories (stories)
  (--map (assoc-default 'id it)
         stories))

(defun search-for-stories (project search-query)
  (let (stories

    (progn
      (search-forward "###")
      (previous-line)
      (--each (--map (assoc-default 'name it)
                     (get-started-stories "Security" "cj"))
        (insert (concat "- [sec] " it)))
      (newline)
      (set-mark-command nil)
