templates: use ia_id instead of lia_name

master
Sarvesh D 2015-12-10 02:05:46 +05:30
parent b4ebf96b60
commit 11b00c1bb1
3 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@ package DDG::Goodie::<: $ia_package_name :>;
use DDG::Goodie;
use strict;
zci answer_type => '<: $lia_name :>';
zci answer_type => '<: $ia_id :>';
# Caching - https://duck.co/duckduckhack/spice_advanced_backend#caching-api-responses
zci is_cached => 1;
@ -36,7 +36,7 @@ handle remainder => sub {
# ID - Must be unique and match Instant Answer page
# E.g. https://duck.co/ia/view/calculator has `id => 'calculator'``
id => '<: $lia_id :>',
id => '<: $ia_id :>',
# Name - Used for Answer Bar Tab
# Value should be chosen from existing Instant Answer topics

View File

@ -1,9 +1,9 @@
DDH.<: $lia_id :> = DDH.<: $lia_id :> || {};
DDH.<: $ia_id :> = DDH.<: $ia_id :> || {};
(function(DDH) {
"use strict";
console.log("DDH.<: $lia_id :>.build"); // remove this before submitting pull request
console.log("DDH.<: $ia_id :>.build"); // remove this before submitting pull request
// define private variables and functions here
//
@ -13,11 +13,11 @@ DDH.<: $lia_id :> = DDH.<: $lia_id :> || {};
// b = '',
// c = '';
DDH.<: $lia_id :>.build = function(ops) {
DDH.<: $ia_id :>.build = function(ops) {
return {
id: '<: $lia_id :>',
id: '<: $ia_id :>',
meta: {
sourceName: "Source Domain",
@ -57,7 +57,7 @@ DDH.<: $lia_id :> = DDH.<: $lia_id :> || {};
// define any callbacks or event handlers here
//
// var $dom = $(".zci--'<: $lia_id :>'");
// var $dom = $(".zci--'<: $ia_id :>'");
// $dom.find(".my-special-class").click(funtcion(){
//
// });

View File

@ -5,7 +5,7 @@ use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "<: $lia_name :>";
zci answer_type => "<: $ia_id :>";
zci is_cached => 1;
ddg_goodie_test(