starthq / search

Search provider API docs & integration implementations.
https://starthq.com
32 stars 26 forks source link

Spotify #9

Open olegp opened 10 years ago

olegp commented 10 years ago

https://developer.spotify.com/web-api/search-item/

ghost commented 10 years ago

Hi Oleg,

This code is not working in my system. I realized that this may be the reason because DOM is created using client side Javascript. But as I have used up my 1 hour I am pasting my code here. Please let me know if there is any other application that I can try.

 {
   search: [
     {
       type:'link',
       query:'https://developer.spotify.com/search/?q={{item}}',
       translate:'parseHTML(response)',
       name:{
         selector:'.gs-title',
         expression:'element.textContent'
       },
       link:{
         selector:'.gs-visibleUrl-long',
         expression:'element.getAttribute("href")'
       },
      description:{
         selector:'.gs-snippet',
         expression:'element.textContent'
       }
     }
   ]
 }
olegp commented 10 years ago

{{item}} should be {{term}} I presume?

On 6 August 2014 13:52, nilanjan1 notifications@github.com wrote:

{ search: [ { type:'link', query:'https://developer.spotify.com/search/?q={{item}}', translate:'parseHTML(response)', name:{ selector:'.gs-title', expression:'element.textContent' }, link:{ selector:'.gs-visibleUrl-long', expression:'element.getAttribute("href")' }, description:{ selector:'.gs-snippet', expression:'element.textContent' } } ]

— Reply to this email directly or view it on GitHub https://github.com/starthq/search/issues/9#issuecomment-51319765.

ghost commented 10 years ago

Yes it is {{term}}. Sorry for the typo.