Skip to content

Commit

Permalink
add salesforce, tweak a couple of yahoo ones
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Pullara committed May 27, 2009
1 parent e1eced9 commit 9cf2a3f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
4 changes: 4 additions & 0 deletions alltables.env
Expand Up @@ -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;
Expand Down
30 changes: 30 additions & 0 deletions 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>
2 changes: 1 addition & 1 deletion shopping/shopping.deals.xml
Expand Up @@ -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;
}
Expand Down
4 changes: 3 additions & 1 deletion yahoo/finance/yahoo.finance.quotes.xml
Expand Up @@ -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>
Expand Down

0 comments on commit 9cf2a3f

Please sign in to comment.