Advertisement
Guest User

playing_cards.js

a guest
May 22nd, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function (env) {
  2.     "use strict";
  3.     env.ddg_spice_playing_cards = function(api_result){
  4.         if(api_result.error || !api_result.cards) {
  5.             return Spice.failed('playing_cards');
  6.         }
  7.        
  8.         Spice.add({
  9.             id: "playing_cards",
  10.             name: "Deck of Cards",
  11.             data: api_result,
  12.             meta: {
  13.                 sourceName: "DeckOfCards",
  14.                 sourceUrl: 'http://deckofcardsapi.com'
  15.             },
  16.             templates: {
  17.                 group: 'media',
  18.                 variants: {
  19.                     tile: 'poster'
  20.                 },
  21.                 options:{
  22.                     content: Spice.playing_cards.content,
  23.                     moreAt: true
  24.                 }
  25.             }
  26.         });
  27.      }
  28.   }
  29. (this));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement