yourub 2.0.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,8 @@ module Yourub
4
4
  module REST
5
5
  module Categories
6
6
  class << self
7
- # it returns an Array containing the categories for the given country,
8
- # or the DEFAULT_COUNTRY if no countries was given.
7
+ # it returns an Array containing the categories for the given country
8
+ # (regionCode). Pass a country code when you need locale-specific titles.
9
9
  # @param client[Yourub::Client]
10
10
  # @param country[Array]
11
11
  #
@@ -16,11 +16,12 @@ module Yourub
16
16
  #
17
17
  def for_country(client, country)
18
18
  categories = []
19
- param = {"part" => "snippet","regionCode" => country }
19
+ region = Array(country).compact.first
20
+ param = { "part" => "snippet", "regionCode" => region }
20
21
  categories_list = video_categories_list_request(client, param)
21
22
  categories_list.data.items.each do |cat_result|
22
- category_name = parse_name(cat_result["snippet"]["title"])
23
- categories.push(cat_result["id"] => category_name)
23
+ category_name = parse_name(cat_result.snippet.title)
24
+ categories.push(cat_result.id => category_name)
24
25
  end
25
26
  return categories
26
27
  end
@@ -24,20 +24,20 @@ module Yourub
24
24
  end
25
25
 
26
26
  private
27
- #
28
- # call the 'execute!' method on the client
29
- #
30
- # == Returns :
31
- # The Request object with the variable @status and @data initialized
32
- # @status [Int]
33
- # @data [String]
34
- #
35
27
  def perform
36
- api_method =@client.youtube_api.send(@resource_type).send(@method)
37
- r = @client.execute!(
38
- :api_method => api_method,
39
- :parameters => @params
40
- )
28
+ api_method =
29
+ case [@resource_type, @method]
30
+ when [:search, :list]
31
+ :search_list
32
+ when [:videos, :list]
33
+ :videos_list
34
+ when [:video_categories, :list]
35
+ :video_categories_list
36
+ else
37
+ raise ArgumentError, "Unsupported resource_type/method: #{@resource_type}/#{@method}"
38
+ end
39
+
40
+ r = @client.execute!(api_method: api_method, parameters: @params.dup)
41
41
  @data = r.data
42
42
  @status = r.status
43
43
  end
@@ -25,9 +25,7 @@ module Yourub
25
25
  private
26
26
 
27
27
  def single_video_params(video_id)
28
- fields = URI::encode(
29
- 'items(id,snippet(title,thumbnails),statistics(viewCount))'
30
- )
28
+ fields = 'items(id,snippet(title,thumbnails),statistics(viewCount))'
31
29
  { :id => video_id,
32
30
  :part => 'snippet,statistics,id',
33
31
  :fields => fields }
data/lib/yourub/result.rb CHANGED
@@ -7,6 +7,7 @@ module Yourub
7
7
  if request.status == 200
8
8
  data = JSON.parse(request.data.items.to_json)
9
9
  end
10
+ puts request.data.items.to_json
10
11
  data
11
12
  end
12
13
 
@@ -2,24 +2,20 @@ module Yourub
2
2
  module Validator
3
3
  class << self
4
4
 
5
- DEFAULT_COUNTRY = "US"
6
- COUNTRIES = [ 'AR','AU','AT','BE','BR','CA','CL','CO','CZ','EG','FR','DE','GB','HK',
7
- 'HU','IN','IE','IL','IT','JP','JO','MY','MX','MA','NL','NZ','PE','PH',
8
- 'PL','RU','SA','SG','ZA','KR','ES','SE','CH','TW','AE','US']
5
+ COUNTRIES = Yourub::CountryCodes::ISO_3166_1_ALPHA2
9
6
  ORDERS = ['date', 'rating', 'relevance', 'title', 'videoCount', 'viewCount']
10
7
  VALID_PARAMS = [:country, :category, :query, :max_results, :count_filter, :order ]
11
- MINIMUM_PARAMS = [:country, :category, :query]
12
8
 
13
9
  def confirm(criteria)
14
10
  valid_format?(criteria)
15
11
  @criteria = symbolize_keys(criteria)
16
12
 
17
13
  remove_empty_and_non_valid_params
18
- minimum_param_present?
14
+ validate_search_query
19
15
 
20
16
  validate_order
17
+ validate_max_results
21
18
  countries_to_array
22
- add_default_country_if_category_is_present
23
19
  validate_countries
24
20
  set_filter_count_options
25
21
 
@@ -41,8 +37,11 @@ module Yourub
41
37
  }
42
38
  end
43
39
 
40
+
44
41
  def remove_empty_and_non_valid_params
45
- @criteria.keep_if{|k,v| ( (VALID_PARAMS.include? k) && v.size > 0) }
42
+ @criteria.reject! do |k, v|
43
+ !VALID_PARAMS.include?(k) || v.nil? || (v.respond_to?(:empty?) && v.empty?)
44
+ end
46
45
  end
47
46
 
48
47
  def countries_to_array
@@ -54,12 +53,6 @@ module Yourub
54
53
  end
55
54
  end
56
55
 
57
- def add_default_country_if_category_is_present
58
- if (@criteria.has_key? :category) && (!@criteria.has_key? :country)
59
- @criteria[:country] = [ DEFAULT_COUNTRY ]
60
- end
61
- end
62
-
63
56
  def set_filter_count_options
64
57
  if @criteria.has_key? :count_filter
65
58
  Yourub::CountFilter.filter = @criteria.delete(:count_filter)
@@ -67,11 +60,9 @@ module Yourub
67
60
  end
68
61
 
69
62
  def valid_category(categories, selected_category)
70
- return categories if selected_category == 'all'
71
- categories = categories.select {|k| k.has_value?(selected_category.downcase)}
63
+ categories = categories.select {|k| k.has_value?(selected_category.downcase.gsub(/\s+/, ""))}
72
64
  if categories.first.nil?
73
- raise ArgumentError.new(
74
- "The category #{selected_category} does not exists in the following ones: #{categories.join(',')}")
65
+ raise ArgumentError.new("The category #{selected_category} does not exists...")
75
66
  end
76
67
  return categories
77
68
  end
@@ -82,11 +73,11 @@ module Yourub
82
73
  ) unless( criteria.is_a? Hash )
83
74
  end
84
75
 
85
- def minimum_param_present?
86
- if @criteria.none?{|k,_| MINIMUM_PARAMS.include? k}
87
- raise ArgumentError.new(
88
- "minimum params to start a search is at least one of: #{MINIMUM_PARAMS.join(',')}"
89
- )
76
+ def validate_search_query
77
+ q = @criteria[:query]
78
+ if !@criteria.key?(:query) || q.nil? || q.to_s.strip.empty?
79
+ raise ArgumentError,
80
+ "search requires a :query parameter."
90
81
  end
91
82
  end
92
83
 
@@ -99,11 +90,13 @@ module Yourub
99
90
  end
100
91
 
101
92
  def validate_countries
102
- if @criteria.has_key? :country
103
- raise ArgumentError.new(
104
- "the given country is not in the available ones: #{COUNTRIES.join(',')}"
105
- ) unless( (@criteria[:country] - COUNTRIES).size == 0 )
106
- end
93
+ return unless @criteria.has_key?(:country)
94
+
95
+ unknown = @criteria[:country] - COUNTRIES
96
+ return if unknown.empty?
97
+
98
+ raise ArgumentError,
99
+ "invalid ISO 3166-1 alpha-2 country code(s): #{unknown.join(', ')}"
107
100
  end
108
101
 
109
102
  def validate_max_results
@@ -1,6 +1,6 @@
1
1
  module Yourub
2
- MAJOR = 2
2
+ MAJOR = 3
3
3
  MINOR = 0
4
- PATCH = 3
4
+ PATCH = 0
5
5
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
6
6
  end
data/lib/yourub.rb CHANGED
@@ -4,6 +4,7 @@ require 'net/https'
4
4
  require 'open-uri'
5
5
 
6
6
  require 'yourub/config'
7
+ require 'yourub/country_codes'
7
8
  require 'yourub/client'
8
9
  require 'yourub/meta_search'
9
10
  require 'yourub/result'
@@ -1 +1,316 @@
1
- [ {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"", "id":"1", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Film & Animation", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"", "id":"2", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Autos & Vehicles", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/nqRIq97-xe5XRZTxbknKFVe5Lmg\"", "id":"10", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Music", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/HwXKamM1Q20q9BN-oBJavSGkfDI\"", "id":"15", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Pets & Animals", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"", "id":"17", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Sports", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/FJwVpGCVZ1yiJrqZbpqe68Sy_OE\"", "id":"18", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Short Movies", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/M-3iD9dwK7YJCafRf_DkLN8CouA\"", "id":"19", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Travel & Events", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/WmA0qYEfjWsAoyJFSw2zinhn2wM\"", "id":"20", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Gaming", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/EapFaGYG7K0StIXVf8aba249tdM\"", "id":"21", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Videoblogging", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/xId8RX7vRN8rqkbYZbNIytUQDRo\"", "id":"22", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"People & Blogs", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/G9LHzQmx44rX2S5yaga_Aqtwz8M\"", "id":"23", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Comedy", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/UVB9oxX2Bvqa_w_y3vXSLVK5E_s\"", "id":"24", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Entertainment", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/QiLK0ZIrFoORdk_g2l_XR_ECjDc\"", "id":"25", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"News & Politics", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/r6Ck6Z0_L0rG37VJQR200SGNA_w\"", "id":"26", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Howto & Style", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/EoYkczo9I3RCf96RveKTOgOPkUM\"", "id":"27", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Education", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/w5HjcTD82G_XA3xBctS30zS-JpQ\"", "id":"28", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Science & Technology", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/SalkJoBWq_smSEqiAx_qyri6Wa8\"", "id":"29", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Nonprofits & Activism", "assignable":true}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/lL7uWDr_071CHxifjYG1tJrp4Uo\"", "id":"30", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Movies", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/WnuVfjO-PyFLO7NTRQIbrGE62nk\"", "id":"31", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Anime/Animation", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ctpH2hGA_UZ3volJT_FTlOg9M00\"", "id":"32", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Action/Adventure", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ\"", "id":"33", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Classics", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/pUZOAC_s9sfiwar639qr_wAB-aI\"", "id":"34", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Comedy", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Xb5JLhtyNRN3AQq021Ds-OV50Jk\"", "id":"35", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Documentary", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/u8WXzF4HIhtEi805__sqjuA4lEk\"", "id":"36", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Drama", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/D04PP4Gr7wc4IV_O9G66Z4A8KWQ\"", "id":"37", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Family", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/i5-_AceGXQCEEMWU0V8CcQm_vLQ\"", "id":"38", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Foreign", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/rtlxd0zOixA9QHdIZB26-St5qgQ\"", "id":"39", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Horror", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/N1TrDFLRppxZgBowCJfJCvh0Dpg\"", "id":"40", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Sci-Fi/Fantasy", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/7UMGi6zRySqXopr_rv4sZq6Za2E\"", "id":"41", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Thriller", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/RScXhi324h8usyIetreAVb-uKeM\"", "id":"42", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Shorts", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/0n9MJVCDLpA8q7aiGVrFsuFsd0A\"", "id":"43", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Shows", "assignable":false}}, {"kind":"youtube#videoCategory", "etag":"\"F9iA7pnxqNgrkOutjQAa9F2k8HY/x5NxSf5fz8hn4loSN4rvhwzD_pY\"", "id":"44", "snippet":{"channelId":"UCBR8-60-B28hp2BmDPdntcQ", "title":"Trailers", "assignable":false}}]
1
+ {
2
+ "kind": "youtube#videoCategoryListResponse",
3
+ "etag": "fIIv2-q7-AkaOeJf0LPrlnu-0As",
4
+ "items": [
5
+ {
6
+ "kind": "youtube#videoCategory",
7
+ "etag": "grPOPYEUUZN3ltuDUGEWlrTR90U",
8
+ "id": "1",
9
+ "snippet": {
10
+ "title": "Film & Animation",
11
+ "assignable": true,
12
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
13
+ }
14
+ },
15
+ {
16
+ "kind": "youtube#videoCategory",
17
+ "etag": "Q0xgUf8BFM8rW3W0R9wNq809xyA",
18
+ "id": "2",
19
+ "snippet": {
20
+ "title": "Autos & Vehicles",
21
+ "assignable": true,
22
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
23
+ }
24
+ },
25
+ {
26
+ "kind": "youtube#videoCategory",
27
+ "etag": "qnpwjh5QlWM5hrnZCvHisquztC4",
28
+ "id": "10",
29
+ "snippet": {
30
+ "title": "Music",
31
+ "assignable": true,
32
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
33
+ }
34
+ },
35
+ {
36
+ "kind": "youtube#videoCategory",
37
+ "etag": "HyFIixS5BZaoBdkQdLzPdoXWipg",
38
+ "id": "15",
39
+ "snippet": {
40
+ "title": "Pets & Animals",
41
+ "assignable": true,
42
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
43
+ }
44
+ },
45
+ {
46
+ "kind": "youtube#videoCategory",
47
+ "etag": "PNU8SwXhjsF90fmkilVohofOi4I",
48
+ "id": "17",
49
+ "snippet": {
50
+ "title": "Sports",
51
+ "assignable": true,
52
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
53
+ }
54
+ },
55
+ {
56
+ "kind": "youtube#videoCategory",
57
+ "etag": "5kFljz9YJ4lEgSfVwHWi5kTAwAs",
58
+ "id": "18",
59
+ "snippet": {
60
+ "title": "Short Movies",
61
+ "assignable": false,
62
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
63
+ }
64
+ },
65
+ {
66
+ "kind": "youtube#videoCategory",
67
+ "etag": "ANnLQyzEA_9m3bMyJXMhKTCOiyg",
68
+ "id": "19",
69
+ "snippet": {
70
+ "title": "Travel & Events",
71
+ "assignable": true,
72
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
73
+ }
74
+ },
75
+ {
76
+ "kind": "youtube#videoCategory",
77
+ "etag": "0Hh6gbZ9zWjnV3sfdZjKB5LQr6E",
78
+ "id": "20",
79
+ "snippet": {
80
+ "title": "Gaming",
81
+ "assignable": true,
82
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
83
+ }
84
+ },
85
+ {
86
+ "kind": "youtube#videoCategory",
87
+ "etag": "q8Cp4pUfCD8Fuh8VJ_yl5cBCVNw",
88
+ "id": "21",
89
+ "snippet": {
90
+ "title": "Videoblogging",
91
+ "assignable": false,
92
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
93
+ }
94
+ },
95
+ {
96
+ "kind": "youtube#videoCategory",
97
+ "etag": "cHDaaqPDZsJT1FPr1-MwtyIhR28",
98
+ "id": "22",
99
+ "snippet": {
100
+ "title": "People & Blogs",
101
+ "assignable": true,
102
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
103
+ }
104
+ },
105
+ {
106
+ "kind": "youtube#videoCategory",
107
+ "etag": "3Uz364xBbKY50a2s0XQlv-gXJds",
108
+ "id": "23",
109
+ "snippet": {
110
+ "title": "Comedy",
111
+ "assignable": true,
112
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
113
+ }
114
+ },
115
+ {
116
+ "kind": "youtube#videoCategory",
117
+ "etag": "0srcLUqQzO7-NGLF7QnhdVzJQmY",
118
+ "id": "24",
119
+ "snippet": {
120
+ "title": "Entertainment",
121
+ "assignable": true,
122
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
123
+ }
124
+ },
125
+ {
126
+ "kind": "youtube#videoCategory",
127
+ "etag": "bQlQMjmYX7DyFkX4w3kT0osJyIc",
128
+ "id": "25",
129
+ "snippet": {
130
+ "title": "News & Politics",
131
+ "assignable": true,
132
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
133
+ }
134
+ },
135
+ {
136
+ "kind": "youtube#videoCategory",
137
+ "etag": "Y06N41HP_WlZmeREZvkGF0HW5pg",
138
+ "id": "26",
139
+ "snippet": {
140
+ "title": "Howto & Style",
141
+ "assignable": true,
142
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
143
+ }
144
+ },
145
+ {
146
+ "kind": "youtube#videoCategory",
147
+ "etag": "yBaNkLx4sX9NcDmFgAmxQcV4Y30",
148
+ "id": "27",
149
+ "snippet": {
150
+ "title": "Education",
151
+ "assignable": true,
152
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
153
+ }
154
+ },
155
+ {
156
+ "kind": "youtube#videoCategory",
157
+ "etag": "Mxy3A-SkmnR7MhJDZRS4DuAIbQA",
158
+ "id": "28",
159
+ "snippet": {
160
+ "title": "Science & Technology",
161
+ "assignable": true,
162
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
163
+ }
164
+ },
165
+ {
166
+ "kind": "youtube#videoCategory",
167
+ "etag": "4pIHL_AdN2kO7btAGAP1TvPucNk",
168
+ "id": "30",
169
+ "snippet": {
170
+ "title": "Movies",
171
+ "assignable": false,
172
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
173
+ }
174
+ },
175
+ {
176
+ "kind": "youtube#videoCategory",
177
+ "etag": "Iqol1myDwh2AuOnxjtn2AfYwJTU",
178
+ "id": "31",
179
+ "snippet": {
180
+ "title": "Anime/Animation",
181
+ "assignable": false,
182
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
183
+ }
184
+ },
185
+ {
186
+ "kind": "youtube#videoCategory",
187
+ "etag": "tzhBKCBcYWZLPai5INY4id91ss8",
188
+ "id": "32",
189
+ "snippet": {
190
+ "title": "Action/Adventure",
191
+ "assignable": false,
192
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
193
+ }
194
+ },
195
+ {
196
+ "kind": "youtube#videoCategory",
197
+ "etag": "ii8nBGYpKyl6FyzP3cmBCevdrbs",
198
+ "id": "33",
199
+ "snippet": {
200
+ "title": "Classics",
201
+ "assignable": false,
202
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
203
+ }
204
+ },
205
+ {
206
+ "kind": "youtube#videoCategory",
207
+ "etag": "Y0u9UAQCCGp60G11Arac5Mp46z4",
208
+ "id": "34",
209
+ "snippet": {
210
+ "title": "Comedy",
211
+ "assignable": false,
212
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
213
+ }
214
+ },
215
+ {
216
+ "kind": "youtube#videoCategory",
217
+ "etag": "_YDnyT205AMuX8etu8loOiQjbD4",
218
+ "id": "35",
219
+ "snippet": {
220
+ "title": "Documentary",
221
+ "assignable": false,
222
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
223
+ }
224
+ },
225
+ {
226
+ "kind": "youtube#videoCategory",
227
+ "etag": "eAl2b-uqIGRDgnlMa0EsGZjXmWg",
228
+ "id": "36",
229
+ "snippet": {
230
+ "title": "Drama",
231
+ "assignable": false,
232
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
233
+ }
234
+ },
235
+ {
236
+ "kind": "youtube#videoCategory",
237
+ "etag": "HDAW2HFOt3SqeDI00X-eL7OELfY",
238
+ "id": "37",
239
+ "snippet": {
240
+ "title": "Family",
241
+ "assignable": false,
242
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
243
+ }
244
+ },
245
+ {
246
+ "kind": "youtube#videoCategory",
247
+ "etag": "QHiWh3niw5hjDrim85M8IGF45eE",
248
+ "id": "38",
249
+ "snippet": {
250
+ "title": "Foreign",
251
+ "assignable": false,
252
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
253
+ }
254
+ },
255
+ {
256
+ "kind": "youtube#videoCategory",
257
+ "etag": "ztKcSS7GpH9uEyZk9nQCdNujvGg",
258
+ "id": "39",
259
+ "snippet": {
260
+ "title": "Horror",
261
+ "assignable": false,
262
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
263
+ }
264
+ },
265
+ {
266
+ "kind": "youtube#videoCategory",
267
+ "etag": "Ids1sm8QFeSo_cDlpcUNrnEBYWA",
268
+ "id": "40",
269
+ "snippet": {
270
+ "title": "Sci-Fi/Fantasy",
271
+ "assignable": false,
272
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
273
+ }
274
+ },
275
+ {
276
+ "kind": "youtube#videoCategory",
277
+ "etag": "qhfgS7MzzZHIy_UZ1dlawl1GbnY",
278
+ "id": "41",
279
+ "snippet": {
280
+ "title": "Thriller",
281
+ "assignable": false,
282
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
283
+ }
284
+ },
285
+ {
286
+ "kind": "youtube#videoCategory",
287
+ "etag": "TxVSfGoUyT7CJ7h7ebjg4vhIt6g",
288
+ "id": "42",
289
+ "snippet": {
290
+ "title": "Shorts",
291
+ "assignable": false,
292
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
293
+ }
294
+ },
295
+ {
296
+ "kind": "youtube#videoCategory",
297
+ "etag": "o9w6eNqzjHPnNbKDujnQd8pklXM",
298
+ "id": "43",
299
+ "snippet": {
300
+ "title": "Shows",
301
+ "assignable": false,
302
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
303
+ }
304
+ },
305
+ {
306
+ "kind": "youtube#videoCategory",
307
+ "etag": "mLdyKd0VgXKDI6GevTLBAcvRlIU",
308
+ "id": "44",
309
+ "snippet": {
310
+ "title": "Trailers",
311
+ "assignable": false,
312
+ "channelId": "UCBR8-60-B28hp2BmDPdntcQ"
313
+ }
314
+ }
315
+ ]
316
+ }