Skip to content

Commit

Permalink
get feed list by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Trystan Lea committed Mar 26, 2014
1 parent a26b712 commit 5377057
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Modules/feed/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ var feed = {

return feeds;
},

'list_by_name':function()
{
var feeds = {};
var apikeystr = ""; if (feed.apikey!="") apikeystr = "?apikey="+feed.apikey;

$.ajax({ url: path+"feed/list.json"+apikeystr, dataType: 'json', async: false, success: function(data) {feeds = data;} });

var tmp = {};
for (z in feeds)
{
tmp[feeds[z]['name']] = parseFloat(feeds[z]['value']);
}
var feeds = tmp;

return feeds;
},

'set':function(id, fields)
{
Expand Down

0 comments on commit 5377057

Please sign in to comment.