Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add salesforce, tweak a couple of yahoo ones

  • Loading branch information...
commit 9cf2a3f19829ef1134f7f7e7ac2943367c5ad764 1 parent e1eced9
Sam Pullara authored
View
4 alltables.env
@@ -77,6 +77,10 @@ use 'http://www.datatables.org/quickbase/intuit.quickbase.info.xml' as intuit.qu
use 'http://www.datatables.org/quickbase/intuit.quickbase.xml' as intuit.quickbase;
use 'http://www.datatables.org/regex/regex.xml' as regex;
use 'http://www.datatables.org/rtm/rtm.auth.frob.xml' as rtm.auth.frob;
+use 'http://www.datatables.org/rtm/rtm.auth.oauth_href.xml' as rtm.auth.oauth_href;
+use 'http://www.datatables.org/rtm/rtm.auth.token.xml' as rtm.auth.token;
+use 'http://www.datatables.org/rtm/rtm.tasks.xml' as rtm.tasks;
+use 'http://www.datatables.org/salesforce/salesforce.login.xml' as salesforce.login;
use 'http://www.datatables.org/search/search.imageweb.xml' as search.imageweb;
use 'http://www.datatables.org/search/search.rank.xml' as search.rank;
use 'http://www.datatables.org/shopping/shopping.deals.xml' as shopping.deals;
View
30 salesforce/salesforce.login.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns:i="http://query.yahooapis.com/v1/schema/internalTable.xsd" xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML" useProxy="true">
+ <urls>
+ <url env="all">http://www.salesforce.com/services/Soap/u/15.0</url>
+ </urls>
+ <inputs>
+ <key id='username' type='xs:string' paramType='variable' required="true" />
+ <key id='password' type='xs:string' paramType='variable' required="true" />
+ <key id='token' type='xs:string' paramType='variable' required="true" />
+ </inputs>
+ <execute><![CDATA[
+ var login =
+<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/">
+ <se:Body>
+ <login xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com">
+ <username>{username}</username>
+ <password>{password + token}</password>
+ </login>
+ </se:Body>
+</se:Envelope>
+response.object = y.rest("http://www.salesforce.com/services/Soap/u/15.0")
+ .contentType("text/xml").header("SOAPAction", '""').post(login).response;
+]]></execute>
+ </select>
+ </bindings>
+</table>
View
2  shopping/shopping.deals.xml
@@ -26,7 +26,7 @@ for each (var div in dealhtml.div) {
deal.price += <price>{compress(div.strong.a.text())}</price>;
deal.shipping += <shipping>{compress(div.em.text())}</shipping>;
deal.description += <description>{compress(div.p[0].*)}</description>;
- deal.status += <status>{compress(div.p[1].*)}</status>;
+ deal.status += <status>{compress(div.p[1].*)}</status>;
deal.logo += <logo>{compress(div.div[1].*)}</logo>;
deals.deal += deal;
}
View
4 yahoo/finance/yahoo.finance.quotes.xml
@@ -17,8 +17,10 @@ var query = "select * from csv where url='http://download.finance.yahoo.com/d/qu
"and columns='Ask,AverageDailyVolume,Bid,AskRealtime,BidRealtime,BookValue,Change&PercentChange,Change,Commission,ChangeRealtime,AfterHoursChangeRealtime,DividendShare,LastTradeDate,TradeDate,EarningsShare,ErrorIndicationreturnedforsymbolchangedinvalid,EPSEstimateCurrentYear,EPSEstimateNextYear,EPSEstimateNextQuarter,DaysLow,DaysHigh,YearLow,YearHigh,HoldingsGainPercent,AnnualizedGain,HoldingsGain,HoldingsGainPercentRealtime,HoldingsGainRealtime,MoreInfo,OrderBookRealtime,MarketCapitalization,MarketCapRealtime,EBITDA,ChangeFromYearLow,PercentChangeFromYearLow,LastTradeRealtimeWithTime,ChangePercentRealtime,ChangeFromYearHigh,PercebtChangeFromYearHigh,LastTradeWithTime,LastTradePriceOnly,HighLimit,LowLimit,DaysRange,DaysRangeRealtime,FiftydayMovingAverage,TwoHundreddayMovingAverage,ChangeFromTwoHundreddayMovingAverage,PercentChangeFromTwoHundreddayMovingAverage,ChangeFromFiftydayMovingAverage,PercentChangeFromFiftydayMovingAverage,Name,Notes,Open,PreviousClose,PricePaid,ChangeinPercent,PriceSales,PriceBook,ExDividendDate,PERatio,DividendPayDate,PERatioRealtime,PEGRatio,PriceEPSEstimateCurrentYear,PriceEPSEstimateNextYear,Symbol,SharesOwned,ShortRatio,LastTradeTime,TickerTrend,OneyrTargetPrice,Volume,HoldingsValue,HoldingsValueRealtime,YearRange,DaysValueChange,DaysValueChangeRealtime,StockExchange,DividendYield'";
var rows = y.query(query).results.row;
var symbols = <symbols></symbols>;
-for each (var row in rows) {
+if (rows) {
+ for each (var row in rows) {
symbols.symbol += <symbol name={row.Symbol.text().toString().replace(/"/g, "")}>{row.*}</symbol>;
+ }
}
response.object = symbols;
]]></execute>
Please sign in to comment.
Something went wrong with that request. Please try again.