PageRenderTime 36ms CodeModel.GetById 32ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/DDG/Spice/KhanAcademy.pm

https://github.com/aembleton/zeroclickinfo-spice
Perl | 35 lines | 28 code | 7 blank | 0 comment | 1 complexity | 05e432c1c371dfa36e8c0435bf763bb9 MD5 | raw file
 1package DDG::Spice::KhanAcademy;
 2
 3use DDG::Spice;
 4
 5primary_example_queries "khan academy videos";
 6secondary_example_queries "khan trigonometry";
 7description "Shows Khan Academy videos";
 8name "KhanAcademy";
 9code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/KhanAcademy.pm";
10icon_url "/i/khanacademy.org.ico";
11topics "math";
12category "reference";
13attribution github => ['https://github.com/arlolra','arlolra'];
14status "enabled";
15
16spice to => join '&',
17    'https://gdata.youtube.com/feeds/api/videos?',
18    'author=khanacademy',
19    'max-results=50',
20    'alt=json-in-script',
21    'callback={{callback}}',
22    'v=2',
23    'q=$1';
24
25triggers any => "khan", "khan academy";
26
27attribution web => ['http://thoughtherder.org','Arlo Breault'],
28            email => ['arlolra@gmail.com','Arlo Breault'];
29
30handle remainder => sub {
31    return $_ if $_;
32    return;   
33};
34
351;