English 中文(简体)
• 如何在标注APIC时建立类似“car子”的植被?
原标题:How to create a "carousel"-like widget in spotify apps API?
  • 时间:2012-01-13 12:23:09
  •  标签:
  • spotify

能否利用该示意图来创建填充我选择数据的这些植被之一? “entergraph

最佳回答

是的,使用进口/封面/页码。 这方面的一个例子是,从“什么是新东西”的用词中提取和简化。 页: 1

"use strict";

sp = getSpotifyApi(1);
var p = sp.require( sp://import/scripts/pager );
var dom = sp.require( sp://import/scripts/dom );

exports.init = init;

function init() {
  var pagerSection = dom.queryOne( #pager );
  var datasource = new DataSource([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);

  var options = {
    perPage: 5,
    hidePartials: true,
    orientation:  vertical ,      //  vertical ,  horizontal 
    pagingLocation:  top ,        //  top ,  bottom 
    bullets: false,
    listType:  list ,             //  table ,  list 
    context:  aToplist            // some string unique for each pager
  };

  var pager = new p.Pager(datasource, options);
  pager.h2.innerHTML = "Example Pager";
  dom.adopt(pagerSection, pager.node);
}

function DataSource(data) {
  var data = data;

  this.count = function() {
    return data.length;
  };

  this.makeNode = function(index) {
    var dataItem = data[index];
    var li = new dom.Element( li );

    var nameColumn = new dom.Element( div , {
      className:  nameColumn ,
      html:  <div class="nameColumn"> +
               <a href="#" class="name">Name  + dataItem +  </a> +
               <a href="#" class="creator">Creator  + dataItem + </a> +
             </div> 
    });

    dom.adopt(li, nameColumn);
    return li;
  };
}

页: 1

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="pager.css">
</head>

<body onload="sp = getSpotifyApi(1); sp.require( pager ).init();">
  <div id="wrapper">
    <section class="toplists" id="bottomToplists">
      <section id="pager" class="playlists playlistsTable toplist"></section>
    </section>
  </div>
</body>
</html>

最后,将新事物复制到你的项目,并改名为网页。 当然,你需要清理和修改你指数中的内容。

“什么是新”也就是一个横向页码的范例。 查阅 这一问题和回答,以说明如何提取数据来源。

我也指出,我不敢确定页数是否是公众人物的一部分。 如果不是这样,你当然可以把它引向你们自己的花旗,用它来做。

问题回答

暂无回答




相关问题
Spotify API get Related Artists

Is there a way to get a list of related artists through the spotify api. Like the small list that displays in the actual program? Would be very useful if so, but I am not so sure Cheers

Spotify Intent in android?

I would like to play a certain spotify playlist, anyone knows if there is any Spotify intent filter available? thanks!

Android - Running applications programmatically

Is there way to run programs like spotify when my phone connects spesific bt device. I have bt stereo on my car and I want my phone start play music from spotify.

No response from jQuery ajax call

I ve been struggling with this for way too long tonight, and I haven t found anything useful when searching for answers. It s probably very simple. I m trying to load data using the Spotify Metadata ...

热门标签