yt_potion v0.1.3 YtPotion.Video

Provides methods to interact with the YouTube Videos API

Summary

Functions

Returns the YouTube API response

Functions

list(filter_part, options \\ %{})
list(map, map) :: map

Returns the YouTube API response

Examples


  iex > YtPotion.Video.list(%{id: "gben9fsNYTM,LTke1j_fkLc", part: "statistics"})

  {:ok,
   %HTTPoison.Response{body: "{
 "kind": "youtube#videoListResponse",
 "etag": "\"gMxXHe-zinKdE9lTnzKu8vjcmDI/VkN1rb33o20QpEbqSoDYD_uBVhk\"",
 "pageInfo": {
  "totalResults": 2,
  "resultsPerPage": 2
 },
 "items": [
  {
   "kind": "youtube#video",
   "etag": "\"gMxXHe-zinKdE9lTnzKu8vjcmDI/4iGPLnHQ0TP8qMdCSoYGmZDc0kY\"",
   "id": "gben9fsNYTM",
   "statistics": {
    "viewCount": "142517",
    "likeCount": "1384",
    "dislikeCount": "47",
    "favoriteCount": "0",
    "commentCount": "76"
   }
  },
  {
   "kind": "youtube#video",
   "etag": "\"gMxXHe-zinKdE9lTnzKu8vjcmDI/MZfxDD4YW6qu4n4TazWHAvc8mqU\"",
   "id": "LTke1j_fkLc",
   "statistics": {
    "viewCount": "72923",
    "likeCount": "731",
    "dislikeCount": "8",
    "favoriteCount": "0",
    "commentCount": "112"
   }
  }
 ]
}
",
    headers: [{"Expires", "Wed, 01 Feb 2017 01:53:21 GMT"},
     {"Date", "Wed, 01 Feb 2017 01:53:21 GMT"},
     {"Cache-Control", "private, max-age=0, must-revalidate, no-transform"},
     {"ETag", ""gMxXHe-zinKdE9lTnzKu8vjcmDI/VkN1rb33o20QpEbqSoDYD_uBVhk""},
     {"Vary", "Origin"}, {"Vary", "X-Origin"},
     {"Content-Type", "application/json; charset=UTF-8"},
     {"X-Content-Type-Options", "nosniff"}, {"X-Frame-Options", "SAMEORIGIN"},
     {"X-XSS-Protection", "1; mode=block"}, {"Content-Length", "764"},
     {"Server", "GSE"}, {"Alt-Svc", "quic=":443"; ma=2592000; v="35,34""}],
    status_code: 200}}