 ;;  "publishedAt" "2017-02-18T19:49:27.000Z"}},
 ;;  "canReply" false,
 ;;  "totalReplyCount" 0,
-;;             "isPublic" true}}
-
-;;  {"kind" "youtube#commentThread",
+;;  "isPublic" true}} {"kind" "youtube#commentThread",
 ;;  "etag" "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/JYrx4nX_y60-v8uR48sjh0c-dpk\"",
 ;;  "id" "z13hurtjypejstvra04ci5wwvqubvzxwm24",
 ;;  "snippet" {"videoId" "d2dNb0wdJF0",

;;  "publishedAt" "2017-02-18T19:49:25.000Z"}},
;;  "canReply" false,
;;  "totalReplyCount" 0,
;;             "isPublic" true}}

;;  {"kind" "youtube#commentThread",
;;  "etag" "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/FznlI6Cbcq2bl91OxawulNEmK_0\"",
;;  "id" "z13xsdoynkyzhpyzm04ccduivvfss5h5j44",
;;  "snippet" {"videoId" "d2dNb0wdJF0",



  my channel= UC4-vzjcBolmvYWYP6ldbLbA
  another channel id = UC4u8goEsLgpPvDX2mKD70nQ "
  [channel-id]
  (let [url (str config/api-base "activities?part=snippet&channelId=" channel-id "&key=" api-key)
        body (-> (http/get url {:as :json}) :body)]
    (log/debug (str "Got activites: " body))
    body))

(defn search-videos
  "Original Url: https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC-lHJZR3Gqxm24_Vd_AJ5Yw&key=

  Use like: `(search-videos api-key 'UC-lHJZR3Gqxm24_Vd_AJ5Yw')`
  ^ pewds channel

  my channel= UC4-vzjcBolmvYWYP6ldbLbA
  another channel id = UC4u8goEsLgpPvDX2mKD70nQ "
  [channel-id]
  (let [url (str config/api-base "search?part=snippet&channelId=" channel-id
                 "&key=" api-key "&order=date")
        body (-> (http/get url {:as :json}) :body)]
    (log/debug (str "Got videos from search: " body))
    (let [as-json (json/read-str body)]
      ;; TODO: go through the items, parse and getting info we want
      (get as-json "items"))))

(defn parse-videos
  "Loop through videos, find all comment threads, scan each,
  store bad ones on a file..."
  []
  "")

;; (get-video-commentThreads api-key "d2dNb0wdJF0")

;; (search-videos api-key "UC-lHJZR3Gqxm24_Vd_AJ5Yw")

;; videos for a channel:
;; [{"kind" "youtube#searchResult",
;;  "etag" "\"uQc-MPTsstrHkQcRXL3IWLmeNsM/xL2Kk-wHmX7jWjGq4UC1iRNQW00\"",
;;  "id" {"kind" "youtube#video",
