quintype 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,94 @@
1
+ class API
2
+ class Story
3
+ module ReadingTime
4
+ extend ActiveSupport::Concern
5
+ WORDS_PER_MINUTE=275
6
+ SLOW_IMAGE_LIMIT=10
7
+ INITIAL_IMAGE_READ_TIME=12
8
+ FINAL_IMAGE_READ_TIME=3
9
+ ESTIMATED_TWEET_WORDS=30
10
+
11
+ def time_in_minutes
12
+ (time_in_seconds.to_f/60).ceil
13
+ end
14
+
15
+ def time_in_seconds
16
+ words_and_image_count_for_cards = cards.flat_map do |card|
17
+ if card['story_elements'].present?
18
+ card['story_elements'].map do |element|
19
+ {
20
+ 'words' => word_count_for_story_element(element),
21
+ 'images' => image_count(element)
22
+ }
23
+ end
24
+ end
25
+ end.compact
26
+ total_words_and_image_count = total_image_and_words_count(words_and_image_count_for_cards)
27
+ total_readtime(total_words_and_image_count)
28
+ end
29
+
30
+ private
31
+ def total_readtime(total_words_and_image_count)
32
+ (total_words_and_image_count["words"].to_i/(WORDS_PER_MINUTE/60)) + image_read_time(total_words_and_image_count)
33
+ end
34
+
35
+ def image_read_time(total_words_and_image_count)
36
+ read_time = 0
37
+ total_words_and_image_count['images'].times do |i|
38
+ read_time += (i >= SLOW_IMAGE_LIMIT ? FINAL_IMAGE_READ_TIME : INITIAL_IMAGE_READ_TIME - i)
39
+ end
40
+ read_time
41
+ end
42
+
43
+ def total_image_and_words_count(words_and_image_counts)
44
+ {
45
+ 'words' => total(words_and_image_counts, 'words'),
46
+ 'images' => total(words_and_image_counts, 'images')
47
+ }
48
+ end
49
+
50
+ def total(words_and_image_counts, element)
51
+ total = 0
52
+ words_and_image_counts.each do |word_and_image_count|
53
+ total += word_and_image_count[element]
54
+ end
55
+ total
56
+ end
57
+
58
+ def image_count(story_element)
59
+ if story_element['type'] == "image" || ['location','instagram'].include?(story_element['subtype'])
60
+ 1
61
+ else
62
+ 0
63
+ end
64
+ end
65
+
66
+ def word_count_for_story_element(story_element)
67
+ case story_element['type']
68
+ when "text"
69
+ text_word_count(story_element['text'])
70
+ when "jsembed"
71
+ jsembed_word_count(story_element['jsembed'])
72
+ else
73
+ 0
74
+ end
75
+ end
76
+
77
+ def text_word_count(text)
78
+ if text.present?
79
+ text.split.size
80
+ else
81
+ 0
82
+ end
83
+ end
84
+
85
+ def jsembed_word_count(story_element)
86
+ if story_element.present? && story_element['subtype'] == "tweet"
87
+ ESTIMATED_TWEET_WORDS
88
+ else
89
+ 0
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,46 @@
1
+ class API
2
+ class URL
3
+ class << self
4
+ def story (story)
5
+ "/" + story['slug']
6
+ end
7
+
8
+ def story_canonical(root, story)
9
+ story['canonical_url'] || (root + story['slug'])
10
+ end
11
+
12
+ def story_amp(root, story)
13
+ root + 'amp/' + story['slug'].split('/').last
14
+ end
15
+
16
+ def topic (tag_name)
17
+ "/topic/" + encode_uri_component(tag_name)
18
+ end
19
+
20
+ def section (section_name)
21
+ "/section/" + make_slug(section_name)
22
+ end
23
+
24
+ def search (term)
25
+ "/search?q=" + term
26
+ end
27
+
28
+ def author (args)
29
+ id = args['id']
30
+ slug = args['slug']
31
+
32
+ "/author/#{id}/#{slug}"
33
+ end
34
+
35
+ def encode_uri_component(s)
36
+ URI.escape(s, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) if s
37
+ end
38
+
39
+ private
40
+
41
+ def make_slug(s)
42
+ s.gsub(/[^\w -]/, "").gsub(/\s+/, "-").downcase if s
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,5 @@
1
+ module Quintype
2
+ class Engine < ::Rails::Engine
3
+ config.autoload_paths += Dir["#{config.root}/lib/**/"]
4
+ end
5
+ end
data/quintype.gemspec ADDED
@@ -0,0 +1,17 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'quintype'
3
+ s.version = '0.0.3'
4
+ s.date = '2016-02-19'
5
+ s.summary = "quintype!"
6
+ s.platform = Gem::Platform::RUBY
7
+ s.description = "A simple hello world gem"
8
+ s.authors = [""]
9
+ s.email = 'dev-core@quintype.com'
10
+ s.files = `git ls-files`.split("\n")
11
+ s.homepage =
12
+ 'http://rubygems.org/gems/quintype'
13
+ s.license = 'MIT'
14
+
15
+ s.add_dependency 'faraday', '~> 0.9'
16
+ s.add_dependency 'activesupport', '~> 4.2'
17
+ end
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ require_relative '../../lib/quintype/api/stack'
3
+
4
+ describe API::Stack do
5
+ describe '#all', :vcr => { cassette_name: "api_stack_all" } do
6
+ it 'gives all stacks' do
7
+ stacks = described_class.all
8
+ expect(stacks.count).to be > 0
9
+ end
10
+ end
11
+
12
+ describe '#with_stories' do
13
+ it 'gives all stacks with stories', :vcr => { cassette_name: "api_stack_with_stories" } do
14
+ stacks = described_class.with_stories
15
+ expect(stacks.count).to be > 0
16
+ stacks.each do |stack|
17
+ expect(stack['stories'].count).to be > 0
18
+ end
19
+ end
20
+
21
+ it 'gives all stacks with stories with params', :vcr => { cassette_name: "api_stack_stories_with_params" } do
22
+ stacks = described_class.with_stories({ 'section' => 'India' })
23
+ expect(stacks.count).to be > 0
24
+ stacks.each do |stack|
25
+ expect(stack['stories'].count).to be > 0
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,102 @@
1
+ require_relative '../../lib/quintype/api/story'
2
+
3
+ describe API::Story do
4
+ describe '#find' , :vcr => { cassette_name: "api_story_find" } do
5
+ it 'finds the stories for the required params' do
6
+ story = described_class.find({limit: 1})
7
+ expect(story.to_h).to_not be_empty
8
+ end
9
+ end
10
+
11
+ describe '#find_in_bulk' , :vcr => { cassette_name: "api_story_find_in_bulk" } do
12
+ it 'finds the stories in bulk for the required params' do
13
+ stories = described_class.find_in_bulk("Sports" => {section: "Sports", limit: '2'}, "Technology" => {section: "Technology", limit: '2'})
14
+ expect(stories).to_not be_empty
15
+ expect(stories['Sports']).to_not be_empty
16
+ expect(stories['Technology']).to_not be_empty
17
+ end
18
+ end
19
+
20
+ describe '#where' , :vcr => { cassette_name: "api_story_find" } do
21
+ it 'finds the stories for the required params' do
22
+ stories = described_class.where({limit: 1})
23
+ expect(stories.count).to eq 1
24
+ end
25
+ end
26
+
27
+ describe '#all', :vcr => { cassette_name: "api_story_all" } do
28
+ it 'gives all stories' do
29
+ stories = described_class.all
30
+ expect(stories.count).to eq 20
31
+ end
32
+ end
33
+
34
+ describe '#all_video_stories', :vcr => { cassette_name: "api_stories_video" } do
35
+ it 'gives all video stories' do
36
+ stories = described_class.all_video_stories
37
+ expect(stories.count).to eq 12
38
+ end
39
+ end
40
+
41
+ describe '#find_by_slug', :vcr => { cassette_name: "api_stories_find_by_slug" } do
42
+ it 'finds story for slug' do
43
+ test_story = described_class.where({limit: 1})
44
+ slug = test_story[0].to_h['slug']
45
+ story = described_class.find_by_slug(slug)
46
+ expect(story.to_h['slug']).to eq slug
47
+ end
48
+ end
49
+
50
+ describe '#find_by_stacks' do
51
+ it 'gives stories for stacks' , :vcr => { cassette_name: "api_story_find_by_stacks" } do
52
+ config = API.config
53
+ stacks_stories = described_class.find_by_stacks(config['layout']['stacks'])
54
+ stack_names = config['layout']['stacks'].map { |s| s['story_group'].gsub('-','_') }
55
+ expect(stacks_stories.keys).to eq(stack_names)
56
+ stacks_stories.each_pair do |story_group, stories|
57
+ expect(stories.count).to be > 0
58
+ end
59
+ end
60
+
61
+ it 'gives stories for stacks for a params passed', :vcr => { cassette_name: "api_story_find_by_stacks_and_sections" } do
62
+ config = API.config
63
+ stacks_stories = described_class.find_by_stacks(config['layout']['stacks'], {'section' => 'India'})
64
+ stack_names = config['layout']['stacks'].map { |s| s['story_group'].gsub('-','_') }
65
+ expect(stacks_stories.keys).to eq(stack_names)
66
+ stacks_stories.each_pair do |story_group, stories|
67
+ expect(stories.count).to be > 0
68
+ end
69
+ end
70
+ end
71
+
72
+ describe '#time_in_minutes' , :vcr => { cassette_name: "api_story_find" } do
73
+ it 'calculates the time taken to read the story' do
74
+ stories = described_class.where({limit: 1})
75
+ story = stories.first
76
+
77
+ expect(story.time_in_minutes).to eq 6
78
+ end
79
+ end
80
+
81
+ describe '#to_h' do
82
+ it 'serializes stories' , :vcr => { cassette_name: "api_story_find" } do
83
+ stories = described_class.where({limit: 1})
84
+ expect(stories.first.to_h.keys).to include("url", "headline", "tags", "sections", "time_in_minutes")
85
+ end
86
+
87
+ it 'serializes stories based on config', :vcr => { cassette_name: "api_story_find_config" } do
88
+ config = API.config
89
+ stories = described_class.where({limit: 1})
90
+ story = stories.first.story
91
+ serialized_story = stories.first.to_h(config.merge('root_url' => 'http://example.com'))
92
+
93
+ expect(story['sections'].first.keys).to_not include("display_name")
94
+ expect(story['sections'].first).to eq({"id"=>5, "name"=>"India"})
95
+ expect(serialized_story.keys).to include("url", "headline", "tags", "sections", "time_in_minutes")
96
+ expect(serialized_story['sections'].first.keys).to include("display_name")
97
+ expect(serialized_story['tags'].first.keys).to include("url")
98
+ expect(serialized_story['sections'].first).to eq({"id"=>5, "name"=>"India", "display_name"=>"India"})
99
+ expect(serialized_story['tags'].first).to eq({"id"=>1821, "name"=>"Afzal Guru", "url"=>"/topic/Afzal%20Guru"})
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,222 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:8001/api/config
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json;charset=UTF-8
23
+ Transfer-Encoding:
24
+ - chunked
25
+ Server:
26
+ - Jetty(9.3.7.v20160115)
27
+ body:
28
+ encoding: ASCII-8BIT
29
+ string: '{"sketches-host":"http://localhost:3000","facebook":{"app-id":"1534865790101524"},"sections":[{"id":143,"name":"InfoGraphiQ","display-name":null,"slug":"infographiq","parent-id":null},{"id":72,"name":"Women","display-name":null,"slug":"women","parent-id":null},{"id":276,"name":"Delhi
30
+ Auto Expo 2016","display-name":"Delhi Auto Expo 2016","slug":"delhi-auto-expo-2016","parent-id":null},{"id":2,"name":"Business","display-name":null,"slug":"business","parent-id":null},{"id":62,"name":"Hot
31
+ Wire","display-name":null,"slug":"hot-wire","parent-id":null},{"id":64,"name":"Blogs","display-name":null,"slug":"blogs","parent-id":null},{"id":97,"name":"TorQue","display-name":null,"slug":"torque","parent-id":null},{"id":85,"name":"Bihar
32
+ Elections","display-name":"Bihar Mobile 2015","slug":"bihar-elections","parent-id":null},{"id":144,"name":"Love
33
+ & Sex","display-name":null,"slug":"love-sex","parent-id":null},{"id":146,"name":"LGBTQ","display-name":null,"slug":"lgbtq","parent-id":null},{"id":17,"name":"World","display-name":null,"slug":"world","parent-id":null},{"id":5,"name":"India","display-name":null,"slug":"india","parent-id":null},{"id":56,"name":"Health
34
+ & Fitness","display-name":null,"slug":"health-fitness","parent-id":null},{"id":145,"name":"QReview","display-name":null,"slug":"qreview","parent-id":null},{"id":147,"name":"Wine
35
+ & Dine","display-name":null,"slug":"wine-dine","parent-id":null},{"id":16,"name":"WaterQooler","display-name":null,"slug":"waterqooler","parent-id":null},{"id":9,"name":"Photos","display-name":null,"slug":"photos","parent-id":null},{"id":6,"name":"Life","display-name":null,"slug":"life","parent-id":null},{"id":13,"name":"Sports","display-name":null,"slug":"sports","parent-id":null},{"id":232,"name":"Pathankot
36
+ Attack","display-name":"Pathankot Attack","slug":"pathankot-attack","parent-id":null},{"id":189,"name":"Chennai
37
+ Floods","display-name":"Chennai Floods","slug":"chennai-floods","parent-id":null},{"id":254,"name":"Letter
38
+ To India","display-name":"Letter To India","slug":"letter-to-india","parent-id":null},{"id":7,"name":"Opinion","display-name":null,"slug":"opinion","parent-id":null},{"id":12,"name":"Politics","display-name":null,"slug":"politics","parent-id":null},{"id":14,"name":"Technology","display-name":null,"slug":"technology","parent-id":null},{"id":3,"name":"Entertainment","display-name":null,"slug":"entertainment","parent-id":null},{"id":15,"name":"Videos","display-name":null,"slug":"videos","parent-id":null},{"id":54,"name":"DeQoded","display-name":null,"slug":"deqoded","parent-id":null},{"id":399,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":400,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":401,"name":"section52559","display-name":"Section
39
+ Display Name","slug":"section52559","parent-id":null},{"id":402,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null},{"id":403,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":404,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":405,"name":"section52559","display-name":"Section
40
+ Display Name","slug":"section52559","parent-id":null},{"id":406,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null},{"id":407,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":408,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":409,"name":"section52559","display-name":"Section
41
+ Display Name","slug":"section52559","parent-id":null},{"id":410,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null},{"id":411,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":412,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":413,"name":"section52559","display-name":"Section
42
+ Display Name","slug":"section52559","parent-id":null},{"id":414,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null},{"id":415,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":416,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":417,"name":"section52559","display-name":"Section
43
+ Display Name","slug":"section52559","parent-id":null},{"id":418,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null},{"id":419,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":420,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":421,"name":"section52559","display-name":"Section
44
+ Display Name","slug":"section52559","parent-id":null},{"id":422,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null},{"id":423,"name":"section52557","display-name":"section52557","slug":"section52557","parent-id":null},{"id":424,"name":"section52558","display-name":"section52558","slug":"section52558","parent-id":null},{"id":425,"name":"section52559","display-name":"Section
45
+ Display Name","slug":"section52559","parent-id":null},{"id":426,"name":"section52560","display-name":"section52560","slug":"section52560","parent-id":null}],"social-links":null,"layout":{"stories-between-stacks":4,"menu":[{"updated-at":1450224734341,"tag-name":null,"publisher-id":1,"item-id":15,"rank":1,"title":"Videos","item-type":"section","section-slug":"videos","id":16,"parent-id":null,"created-at":1437549738996,"section-name":"Videos","data":{"color":"#555555"}},{"updated-at":1454313116949,"tag-name":null,"publisher-id":1,"item-id":276,"rank":5,"title":"Delhi
46
+ Auto Expo 2016","item-type":"section","section-slug":"delhi-auto-expo-2016","id":144,"parent-id":null,"created-at":1454306041874,"section-name":"Delhi
47
+ Auto Expo 2016","data":{"color":"#990432"}},{"updated-at":1454313163097,"tag-name":null,"publisher-id":1,"item-id":3,"rank":6,"title":"Entertainment","item-type":"section","section-slug":"entertainment","id":6,"parent-id":null,"created-at":1437549738996,"section-name":"Entertainment","data":{"color":"#0078BE"}},{"updated-at":1454313164839,"tag-name":null,"publisher-id":1,"item-id":13,"rank":7,"title":"Sports","item-type":"section","section-slug":"sports","id":7,"parent-id":null,"created-at":1437549738996,"section-name":"Sports","data":{"color":"#00BE46"}},{"updated-at":1454313167360,"tag-name":null,"publisher-id":1,"item-id":14,"rank":8,"title":"Technology","item-type":"section","section-slug":"technology","id":8,"parent-id":null,"created-at":1437549738996,"section-name":"Technology","data":{"color":"#FFA01E"}},{"updated-at":1454313169264,"tag-name":null,"publisher-id":1,"item-id":7,"rank":9,"title":"Opinion","item-type":"section","section-slug":"opinion","id":5,"parent-id":null,"created-at":1437549738996,"section-name":"Opinion","data":{"color":"#ffa01e"}},{"updated-at":1454313169265,"tag-name":null,"publisher-id":1,"item-id":254,"rank":10,"title":"Letter
48
+ to India<br/><em>Brought to you by Motorola</em>","item-type":"section","section-slug":"letter-to-india","id":135,"parent-id":null,"created-at":1453371355888,"section-name":"Letter
49
+ To India","data":{"color":"#000000"}},{"updated-at":1454313130479,"tag-name":null,"publisher-id":1,"item-id":56,"rank":11,"title":"Health
50
+ & Fitness","item-type":"section","section-slug":"health-fitness","id":12,"parent-id":null,"created-at":1437549738996,"section-name":"Health
51
+ & Fitness","data":{"color":"#5D0060"}},{"updated-at":1454313132154,"tag-name":null,"publisher-id":1,"item-id":72,"rank":12,"title":"Women","item-type":"section","section-slug":"women","id":25,"parent-id":null,"created-at":1439446504772,"section-name":"Women","data":{"color":"#f12b5b"}},{"updated-at":1454313134990,"tag-name":null,"publisher-id":1,"item-id":12,"rank":13,"title":"Politics","item-type":"section","section-slug":"politics","id":2,"parent-id":null,"created-at":1437549738996,"section-name":"Politics","data":{"color":"#C24CD1"}},{"updated-at":1454313136983,"tag-name":null,"publisher-id":1,"item-id":5,"rank":14,"title":"India","item-type":"section","section-slug":"india","id":1,"parent-id":null,"created-at":1437549738996,"section-name":"India","data":{"color":"#AA1E50"}},{"updated-at":1454313139340,"tag-name":null,"publisher-id":1,"item-id":62,"rank":15,"title":"Hot
52
+ Wire","item-type":"section","section-slug":"hot-wire","id":14,"parent-id":null,"created-at":1437549738996,"section-name":"Hot
53
+ Wire","data":{"color":"#F42558"}},{"updated-at":1454313141023,"tag-name":null,"publisher-id":1,"item-id":54,"rank":16,"title":"DeQoded","item-type":"section","section-slug":"deqoded","id":11,"parent-id":null,"created-at":1437549738996,"section-name":"DeQoded","data":{"color":"#7d00b3"}},{"updated-at":1454313143103,"tag-name":null,"publisher-id":1,"item-id":17,"rank":25,"title":"World","item-type":"section","section-slug":"world","id":3,"parent-id":null,"created-at":1437549738996,"section-name":"World","data":{"color":"#00BEC8"}},{"updated-at":1454313145973,"tag-name":null,"publisher-id":1,"item-id":2,"rank":36,"title":"Business","item-type":"section","section-slug":"business","id":4,"parent-id":null,"created-at":1437549738996,"section-name":"Business","data":{"color":"#FFC100"}},{"updated-at":1454313147705,"tag-name":null,"publisher-id":1,"item-id":6,"rank":45,"title":"Life","item-type":"section","section-slug":"life","id":9,"parent-id":null,"created-at":1437549738996,"section-name":"Life","data":{"color":"#F00064"}},{"updated-at":1454313149898,"tag-name":null,"publisher-id":1,"item-id":9,"rank":66,"title":"Photos","item-type":"section","section-slug":"photos","id":15,"parent-id":null,"created-at":1437549738996,"section-name":"Photos","data":{"color":"#FF6464"}},{"updated-at":1454313152779,"tag-name":null,"publisher-id":1,"item-id":16,"rank":67,"title":"WaterQooler","item-type":"section","section-slug":"waterqooler","id":10,"parent-id":null,"created-at":1437549738996,"section-name":"WaterQooler","data":{"color":"#ECC7F0"}},{"updated-at":1454313155367,"tag-name":null,"publisher-id":1,"item-id":97,"rank":68,"title":"TorQue","item-type":"section","section-slug":"torque","id":36,"parent-id":null,"created-at":1440994990137,"section-name":"TorQue","data":{"color":"#0f3250","link":""}},{"updated-at":1454313155368,"tag-name":null,"publisher-id":1,"item-id":232,"rank":69,"title":"Pathankot
54
+ Attack","item-type":"section","section-slug":"pathankot-attack","id":125,"parent-id":null,"created-at":1452499064741,"section-name":"Pathankot
55
+ Attack","data":{"color":"#FF4000"}},{"updated-at":1454306054893,"tag-name":null,"publisher-id":1,"item-id":147,"rank":74,"title":"Wine
56
+ & Dine","item-type":"section","section-slug":"wine-dine","id":66,"parent-id":null,"created-at":1444893223946,"section-name":"Wine
57
+ & Dine","data":{"color":"#ffaf00"}},{"updated-at":1454306053148,"tag-name":null,"publisher-id":1,"item-id":144,"rank":102,"title":"Love
58
+ & Sex","item-type":"section","section-slug":"love-sex","id":143,"parent-id":null,"created-at":1454295699150,"section-name":"Love
59
+ & Sex","data":{"color":"#990776"}},{"updated-at":1454306050967,"tag-name":null,"publisher-id":1,"item-id":146,"rank":122,"title":"LGBTQ","item-type":"section","section-slug":"lgbtq","id":74,"parent-id":null,"created-at":1446434939538,"section-name":"LGBTQ","data":{"color":"#DB145A"}},{"updated-at":1454306049234,"tag-name":null,"publisher-id":1,"item-id":64,"rank":125,"title":"Blogs","item-type":"section","section-slug":"blogs","id":13,"parent-id":null,"created-at":1437549738996,"section-name":"Blogs","data":{"color":"#555555"}},{"updated-at":1454306047626,"tag-name":null,"publisher-id":1,"item-id":143,"rank":135,"title":"InfographiQ","item-type":"section","section-slug":"infographiq","id":67,"parent-id":null,"created-at":1445241653622,"section-name":"InfoGraphiQ","data":{"color":"#0080FF"}},{"updated-at":1454306045960,"tag-name":null,"publisher-id":1,"item-id":null,"rank":143,"title":"Subscribe
60
+ to Newsletter ","item-type":"link","section-slug":null,"id":68,"parent-id":null,"created-at":1445312747650,"section-name":null,"data":{"color":"#444444","link":"http://eepurl.com/bo_kl9"}},{"updated-at":1454306043996,"tag-name":null,"publisher-id":1,"item-id":null,"rank":144,"title":"Download
61
+ Android App","item-type":"link","section-slug":null,"id":69,"parent-id":null,"created-at":1445312988314,"section-name":null,"data":{"color":"#444444","link":"https://play.google.com/store/apps/details?id=com.thequint.mobile.android&hl=en"}}],"stacks":[{"show-on-locations":[null,null,null,null,null,null,null,null],"background-color":"#F12B5B","rank":1,"type":"stack","story-group":"stack-5","deleted-at":null,"max-stories":"5","id":5,"show-on-all-sections?":true,"heading":"Hot
62
+ Wire"},{"show-on-locations":["Home"],"background-color":"#FFC100","rank":2,"type":"stack","story-group":"featured","deleted-at":null,"max-stories":5,"id":3,"show-on-all-sections?":true,"heading":"QuintEssential"},{"show-on-locations":["Home","InfoGraphiQ","Women","Business","Hot
63
+ Wire","Blogs","TorQue","Bihar Elections","Love & Sex","LGBTQ","World","India","Health
64
+ & Fitness","QReview","Wine & Dine","WaterQooler","Photos","Life","Opinion","Politics","Technology","Entertainment","Videos","DeQoded"],"background-color":"#7D00B3","rank":3,"type":"stack","story-group":"trending","deleted-at":null,"max-stories":5,"id":1,"show-on-all-sections?":true,"heading":"Trending"},{"show-on-locations":[null],"background-color":"#00c5c5","rank":4,"type":"stack","story-group":"stack-11","deleted-at":null,"max-stories":5,"id":11,"show-on-all-sections?":true,"heading":"Videos"},{"show-on-locations":[],"background-color":"#DF01A5","rank":5,"type":"stack","story-group":"stack-42","deleted-at":null,"max-stories":5,"id":42,"show-on-all-sections?":false,"heading":"#MyLoveStory"}]},"cdn-name":"http://d9zv4zsfqrm9s.cloudfront.net/","publisher-id":1,"num-headlines":5,"env":"dev","initial-stories-per-page":40,"seo-metadata":[{"id":11,"publisher-id":1,"owner-type":"section","owner-id":7,"unused-guid":null,"data":{"title":"The
65
+ Quint: For News, Opinion, Op-Eds, Editorials, Features, Videos Articles","description":"For
66
+ the finest Opinion, Editorials, Op-Eds, Features, Videos, on Politics, Movies,
67
+ Tech, Sports, Business, Finance, World News, Current Affairs, Food, Health
68
+ - read TheQuint.com","keywords":"News Opinion, Business News Opinion, Tech
69
+ News Opinion, Sport News Opinion, World News Opinion, Videos, Features, The
70
+ Quint","page-title":"The finest Opinion, Editorials, Op-Eds, Features & Videos:
71
+ The Quint"},"created-at":1433370654196,"updated-at":1434442656706},{"id":2,"publisher-id":1,"owner-type":"section","owner-id":17,"unused-guid":null,"data":{"title":"The
72
+ Quint: Latest International News, Features, Videos and Infographics","description":"For
73
+ the latest International News, World News, Headlines from the USA, China,
74
+ Europe, Asia, Africa, the Middle East, Pakistan, Australia, News Videos, News
75
+ Features - visit TheQuint.com","keywords":"Latest International News, World
76
+ News, World Headlines, USA, Europe, Asia, China, Pakistan, Features, Videos,
77
+ The Quint","page-title":"World News, Latest International News, Headlines
78
+ & Videos: The Quint"},"created-at":1432094933660,"updated-at":1434442244143},{"id":13,"publisher-id":1,"owner-type":"section","owner-id":16,"unused-guid":null,"data":{"title":"The
79
+ Quint: Strange and Odd News, Features, Videos, Water Cooler News and Articles","description":"For
80
+ Water Cooler Stories, Articles, Features, weird, strange and offbeat news
81
+ across India and the world - visit TheQuint.com","keywords":"WaterQooler News,
82
+ Water Cooler News, Strange News, Odd News, Offbeat News, Weird News, Features,
83
+ Videos, The Quint","page-title":"Strange & Odd News, Weird, Bizarre Stories,
84
+ Watercooler: The Quint"},"created-at":1433371358602,"updated-at":1434442981822},{"id":3,"publisher-id":1,"owner-type":"section","owner-id":3,"unused-guid":null,"data":{"title":"The
85
+ Quint: Latest Bollywood, Hollywood News, Movies, Celebs, Features, Reviews
86
+ and Videos","description":"Catch all the Entertainment News, Features and
87
+ Reviews and Videos from Bollywood and Hollywood. For the Latest Entertainment,
88
+ Bollywood, Hollywood, Movie, news, features and reviews -- read TheQuint.com","keywords":"Entertainment
89
+ News, Bollywood News, Hollywood News, Celebrities, Movies, Film Reviews, Features,
90
+ Videos, The Quint","page-title":"Latest Bollywood & Hollywood News, Celeb
91
+ News, Movies: The Quint"},"created-at":1432095031394,"updated-at":1434442794890},{"id":1,"publisher-id":1,"owner-type":"home","owner-id":null,"unused-guid":null,"data":{"title":"For
92
+ the latest Political, Business, Sports, Entertainment, World, Technology and
93
+ General News, visit thequint.com The Quint is a favourite destination for
94
+ all kinds of news.","description":"The Quint: For the latest Political, Business,
95
+ Sports, Entertainment, World, Technology and General News, visit thequint.com
96
+ The Quint is a favourite destination for all kinds of news.","keywords":"Latest
97
+ Political News, Business News, Sports News, Entertainment News, World News,
98
+ Features, Videos","page-title":"Latest Political, Sports & Entertainment News
99
+ & Features: The Quint"},"created-at":1432017926529,"updated-at":1448926781913},{"id":8,"publisher-id":1,"owner-type":"section","owner-id":13,"unused-guid":null,"data":{"title":"The
100
+ Quint: The Latest Sports News on Cricket, Football, Badminton, F1 , Sports
101
+ Videos, Sports Features","description":"Get the latest Sports News, Features
102
+ and Videos on Cricket, Football, Tennis, Badminton, F1, Basketball and other
103
+ sports: visit thequint.com","keywords":"Sports News, Latest Sports News, Cricket
104
+ News, Football News, Badminton News, F1 News, Sports Videos, Sports Features,
105
+ The Quint","page-title":"Latest Sports news about Cricket, Football, Badminton,
106
+ F1: The Quint"},"created-at":1433370423462,"updated-at":1434442619858},{"id":14,"publisher-id":1,"owner-type":"section","owner-id":54,"unused-guid":null,"data":{"title":"The
107
+ Quint: News Decoded, News Explained, DeQoded ","description":"Simple Explainers
108
+ of the current affairs and news, explained simply, in the The Quint''s usual
109
+ breezy style. Get on top of the latest news from India and around the world
110
+ in DeQoded - visit TheQuint.com","keywords":"DeQoded News, News Explained,
111
+ News Decoded, The Quint","page-title":"News Decoded, News Explained, News
112
+ Perspective, DeQoded: The Quint"},"created-at":1433372123345,"updated-at":1434442892546},{"id":10,"publisher-id":1,"owner-type":"section","owner-id":15,"unused-guid":null,"data":{"title":"The
113
+ Quint: Latest News Videos, Features Videos, Entertainment Videos, Stand-Ups,
114
+ Satire","description":"For the latest News Videos, Features and Entertainment
115
+ Videos, Stand-Ups, Satire, Current Affairs Videos, Business News Videos, Sports
116
+ News Videos from India and around the world - visit TheQuint.com","keywords":"News
117
+ Videos, Features Videos, Entertainment Videos, Stand-Ups, Satire, Current
118
+ Affairs Videos, Business News Videos, Sports News Videos.","page-title":"Latest
119
+ News and Entertainment Videos, Features & Stand-Ups: The Quint"},"created-at":1433370586817,"updated-at":1434442847122},{"id":4,"publisher-id":1,"owner-type":"section","owner-id":6,"unused-guid":null,"data":{"title":"The
120
+ Quint: Stories on Life, Love, Lifestyle, Relationships and Living","description":"For
121
+ good articles on Life, Relationships, Lifestyle and Living, visit TheQuint.com","keywords":"Articles
122
+ on Life, Articles Today On Life, Top Articles On Life, The Quint","page-title":"Stories
123
+ on Life, Love, Lifestyle, Relationships and Living: The Quint"},"created-at":1432095288493,"updated-at":1434442577876},{"id":12,"publisher-id":1,"owner-type":"section","owner-id":14,"unused-guid":null,"data":{"title":"The
124
+ Quint: Latest on Technology News, Mobiles, Gadget, Apps, Features, Videos","description":"For
125
+ latest Technology news, news about the latest mobile phones, gadgets, computers,
126
+ software, hardware, consumer electronics, Telecom, ecommerce, IT news, features,
127
+ videos - visit TheQuint.com","keywords":"Technology News, Mobile Phone, Smartphones,
128
+ Smartphone Reviews, iPhone, Apple, Samsung, News, Gadgets, Computers, Software,
129
+ Hardware, Consumer Electronics, ecommerce News, Webculture, Tim Cook, Facebook,
130
+ Twitter, Technology Reviews, First impressions, Smartphone Launches, App Reviews,
131
+ Game reviews, PlayStation, XBox, Microsoft, MacBook, Motorola, Lenovo ","page-title":"Latest
132
+ Technology News, Mobiles, Gadget and Videos: The Quint"},"created-at":1433370703814,"updated-at":1440997890270},{"id":7,"publisher-id":1,"owner-type":"section","owner-id":5,"unused-guid":null,"data":{"title":"The
133
+ Quint: Latest Indian News, Headlines, Features, Breaking News and Videos from
134
+ India ","description":"For the latest news from India, Top Headlines, Breaking
135
+ News, Live News, News Features and News Videos - visit TheQuint.com ","keywords":"India
136
+ News, Latest India News, News Videos, News Features, Breaking News from India,
137
+ News from India, Top India Headlines, The Quint","page-title":"Latest News
138
+ from India, Breaking News, Top Headlines: The Quint"},"created-at":1433370339640,"updated-at":1434442281817},{"id":9,"publisher-id":1,"owner-type":"section","owner-id":12,"unused-guid":null,"data":{"title":"The
139
+ Quint: Latest Political News, Political Features, Videos and Infographics","description":"For
140
+ the latest Political News, Political Features, Videos and Infographics from
141
+ India and around the world, visit TheQuint.com","keywords":"Political News,
142
+ Current Political News, Today''s Political News, Political Features, Videos,
143
+ The Quint","page-title":"Latest Political News, Political Features and Videos:
144
+ The Quint"},"created-at":1433370507895,"updated-at":1434442696539},{"id":15,"publisher-id":1,"owner-type":"section","owner-id":56,"unused-guid":null,"data":{"title":"The
145
+ Quint: Latest Health News, Health Features, Videos, Diet, Fitness, Lifestyle
146
+ Ailments, Alternative Medicine, Therapies","description":"Get the Latest on
147
+ Health News, Health Features, Health Videos, Diets, Fitness, Alternative Medicine,
148
+ Therapies, Lifestyle Ailments - visit TheQuint.com","keywords":"Health, Fitness,
149
+ Diet, Health News, Health Videos, Lifestyle Ailments, Diseases, Health Features,
150
+ Alternative Medicine, Therapies, The Quint","page-title":"Latest Health News,
151
+ Diets, Fitness, Lifestyle Ailments: The Quint"},"created-at":1433390187064,"updated-at":1434442327056},{"id":5,"publisher-id":1,"owner-type":"section","owner-id":9,"unused-guid":null,"data":{"title":"The
152
+ Quint: Latest News Photos, Slideshows, Photo Gallery, Photo Features, Business
153
+ News Photos, Sports Photos, Entertainment Photos, Tech Photos, Business News
154
+ Photos, Political News Photos, Celeb Photos, Car Photos","description":"For
155
+ Photos, Photo Galleries, Slide Shows, Photo Features of the latest News, Business
156
+ News, Sports News, Entertainment News, Tech News, Business News, Political
157
+ News, Celebs, Cars, Models - visit TheQuint.com","keywords":"Photos, Photo
158
+ Galleries, Slide Shows, Photo Features, Picture Galleries, Politics Photos,
159
+ Business Photos, Sports Photos, Entertainment Photos, Tech Photos,Celebs Photos,
160
+ Movie Pictures, Car Photos, Photos of hot Models, The Quint","page-title":"Latest
161
+ News Photos, Slideshows, Photo Gallery and Features: The Quint"},"created-at":1432095470241,"updated-at":1434442529897},{"id":6,"publisher-id":1,"owner-type":"section","owner-id":2,"unused-guid":null,"data":{"title":"The
162
+ Quint: Latest Business News, Features, Videos on Stock Markets, Personal Finance,
163
+ Indian Business News, World Business News, Finance, Economics","description":"Get
164
+ the Latest on Business News, Personal Finance, Stock Markets, World Business,
165
+ Sensex, BSE, NSE, Nifty, Stock Market news - visit TheQuint.com","keywords":"Business
166
+ News, Financial News, Personal Finance, Stock Market News, Sensex News, BSE
167
+ News, NSE Nifty News, Features, Videos, The Quint","page-title":"Latest news
168
+ about Business, Stock Markets, Personal Finance: The Quint"},"created-at":1433370259231,"updated-at":1448526451192},{"id":18,"publisher-id":1,"owner-type":"section","owner-id":72,"unused-guid":null,"data":{"page-title":"Latest
169
+ Women''s Issues & News, Health, Fitness, Trends, Lifestyle, Fashion: The Quint","title":"The
170
+ Quint: Latest Women''s Issues & News, Fitness Features, Trends, Videos, Lifestyle
171
+ and Fashion","description":"Get the latest news on Women\u2019s Issues, Health
172
+ and Fitness, Videos, Lifestyle, Fashion - visit TheQuint.com ","keywords":"Women
173
+ Issues & News, Health, Fitness, Trends, Lifestyle, Fashion, The Quint"},"created-at":1439447348223,"updated-at":1442057484763},{"id":21,"publisher-id":1,"owner-type":"section","owner-id":85,"unused-guid":null,"data":{"page-title":"Bihar
174
+ Assembly Elections 2015: News, Opinon, Analysis, Features, Videos and Infographics:
175
+ The Quint","title":"The Quint: Bihar Assembly Election News, Bihar Election
176
+ Features, Analysis, Videos and Infographics","description":"Bihar Assembly
177
+ Elections 2015: for latest News, Features, Opinion, Analysis and Infographics
178
+ on the Bihar Assembly Elections 2015, visit www.thequint.com","keywords":"Bihar
179
+ Assembly Elections 2015 News, Lalu Prasad, Nitish Kumar, Narendra Modi, Jitan
180
+ Ram Manjhi, Ram Vilas Paswan, Assaduddin Owaisi, Sushil Modi, Political News,
181
+ Today''s Bihar Assembly Elections 2015 News, Political Features, Videos, The
182
+ Quint"},"created-at":1442975772257,"updated-at":1448919753147},{"id":19,"publisher-id":1,"owner-type":"section","owner-id":97,"unused-guid":null,"data":{"page-title":"Latest
183
+ Automobile News, Reviews, Cars, Bikes, First Drives, Videos, Auto Accessories:
184
+ The Quint","title":"The Quint: Latest Automobile News, Reviews, Cars, Bikes,
185
+ Test Drives, Videos, Auto Accessories","description":"For the latest Automobile
186
+ News, Reviews, Car & Bike Launches, First Drives, Auto Accessories - visit
187
+ TheQuint.com","keywords":"Cars, bikes, automobile news, car reviews, car prices,
188
+ used cars, auto launches, first drive, latest cars & bikes, features, auto
189
+ industry reports, SUV, MUV, sedan, hatch back, BHP, mileage"},"created-at":1440996262108,"updated-at":1442058272472},{"id":22,"publisher-id":1,"owner-type":"section","owner-id":147,"unused-guid":null,"data":{"page-title":"Food
190
+ & Drink, Recipes, Restaurants, Healthy Eating, Health Food, Cooking, Indian
191
+ Recipes, Food Festivals, Fine Dining, Wine and Restaurant Reviews: The Quint
192
+ ","title":"The Quint: Food & Drink, Recipes, Restaurants, Healthy Eating,
193
+ Health Food, Cooking, Indian Recipes, Food Festivals, Wine and Restaurant
194
+ Reviews, Fine Dining, Wine & Dine ","description":"Get the Best on Food and
195
+ Drink, Recipes, Restaurants, Healthy Recipes, Restaurant Reviews, Healthy
196
+ Food and Diet, Food Festivals and Wine - visit TheQuint.com","keywords":"Latest
197
+ Food News, Healthy Recipes, Restaurant Reviews, Healthy Food and Diet, Food
198
+ Festivals, Wine and Dine, The Quint"},"created-at":1444893957146,"updated-at":1445080191331},{"id":20,"publisher-id":1,"owner-type":"section","owner-id":64,"unused-guid":null,"data":{"page-title":"Best
199
+ Blogs From The Finest Minds Across A Range Of Topics - The Quint","title":"The
200
+ Quint: Best Blogs From The Finest Minds Across A Range Of Topics","description":"Read
201
+ excellent blogs by fine writers, on topics ranging from Politics, Food, Bikes,
202
+ to Business, Bollywood, Sports & more!","keywords":"Blogs, Writers, Bloggers,
203
+ Blogging, Politics, Food, Entertainment, Women, Business, Technology, Cricket,
204
+ Sport"},"created-at":1442058990022,"updated-at":1442060558794},{"id":30,"publisher-id":1,"owner-type":"section","owner-id":146,"unused-guid":null,"data":{"page-title":"LGBT:
205
+ News, Features, Opinion, Videos, Analysis & Infographics pertaining to the
206
+ LGBT community: The Quint","title":"The Quint: LGBT: News, Features, Opinion,
207
+ Videos, Analysis & Infographics pertaining to the LGBT community.","description":"LGBT:
208
+ For the latest News, fine Features, Opinion, Videos, Analysis & Infographics
209
+ pertaining to the LGBT community, visit TheQuint.com","keywords":"LGBT, Gay,
210
+ Queer, Transgender, Cross-Dressing, Lesbian, Bi-Sexual, Transvestite, Lady
211
+ Boy, Hermaphrodite."},"created-at":1448924171416,"updated-at":1448926951749},{"id":23,"publisher-id":1,"owner-type":"section","owner-id":143,"unused-guid":null,"data":{"page-title":"Data
212
+ Journalism: Latest News Through Interactive Data Visualisation, Infographics,
213
+ Heat Maps, Charts, Graphs: The Quint","title":"The Quint: Interactive Data
214
+ Journalism, Infographics, Infographs, Data Visualisation, Graphs, Interactives,
215
+ News, Open data, Data Journalism, data driven journalism, maps, India, world
216
+ maps, heat maps","description":"Data Journalism: Latest News & Analysis using
217
+ Interactive Data Visualisation, Infographics, Heat Maps, Charts, Graphs: visit
218
+ TheQuint.com","keywords":"Data Journalism, Data Visualisation, Infographics,
219
+ Charts, Graphs, Data, Interactives, Mobile customised infographs, statistics"},"created-at":1445241539621,"updated-at":1448925677429}],"typekit-id":"fxm3vbg","cdn-image":"qt-staging-01.imgix.net","story-slug-format":"{{section}}/{{first-published-at|YYYY/MM/dd}}","android":{"notification-style":"individual"},"airbrake":{"projectId":null,"apiKey":null},"shrubbery-host":"http://analytics.lvh.me:5001","nudge-host":"http://localhost:8001","num-more-stories":20,"apps-data":{"al:android:package":"com.thequint.mobile.android","al:android:app_name":"TheQuint"},"razorpay-gateway-key":null,"story-attributes":[],"mins-between-refreshes":25}'
220
+ http_version:
221
+ recorded_at: Fri, 22 Apr 2016 03:29:52 GMT
222
+ recorded_with: VCR 3.0.1