/lib/DDG/Spice/SoundCloud.pm
Perl | 23 lines | 16 code | 6 blank | 1 comment | 2 complexity | 95ed6a6f6852f8c58c063c17972285d4 MD5 | raw file
Possible License(s): Apache-2.0
- package DDG::Spice::SoundCloud;
- # ABSTRACT: Audio file search on SoundCloud
- use strict;
- use DDG::Spice;
- spice call_type => 'self';
- spice alt_to => {
- sound_cloud_result => {
- to => 'https://api.soundcloud.com/tracks.json?client_id={{ENV{DDG_SPICE_SOUNDCLOUD_APIKEY}}}&q=$1&limit=35&filter=streamable'
- }
- };
- triggers startend => "sc", "soundcloud", "sound cloud";
- handle remainder => sub {
- return if $_ eq '';
- return $_ if $_;
- return;
- };
- 1;