<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
    <meta>
        <author>Ryuichi Okumura</author>
        <documentationURL>http://developer.yahoo.co.jp/webapi/auctions/auction/v1/mycloselist.html</documentationURL>
    </meta>
    <bindings>
        <select itemPath="ResultSet.Result" produces="XML">
            <urls>
                <url>http://auctions.yahooapis.jp/AuctionWebService/V1/myCloseList</url>
            </urls>
            <inputs>
                <key id="page" type="xs:string" paramType="query" required="false" />
                <key id="list" type="xs:string" paramType="query" required="false" />
                <key id="oauth_consumer_key" type="xs:string" paramType="variable" required="true" />
                <key id="consumer_secret" type="xs:string" paramType="variable" required="true" />
                <key id="oauth_token" type="xs:string" paramType="variable" required="true" />
                <key id="token_secret" type="xs:string" paramType="variable" required="true" />
            </inputs>
            <execute><![CDATA[

var document = {
    getElementsByTagName: function(value) {
        return null;
    }
};

y.include("http://oauth.googlecode.com/svn/code/javascript/sha1.js");
y.include("http://oauth.googlecode.com/svn/code/javascript/oauth.js");

var accessor = {
    consumerSecret: consumer_secret,
    tokenSecret: token_secret
};

y.log(request.url);

var message = {
    method: "GET",
    action: request.url,
    parameters: []
};

message.parameters.push(
    ["oauth_consumer_key", oauth_consumer_key],
    ["oauth_token", oauth_token],
    ["oauth_signature_method", "HMAC-SHA1"],
    ["oauth_version", "1.0"]
);

OAuth.setTimestampAndNonce(message);
OAuth.SignatureMethod.sign(message, accessor);

response.object = request.header("Authorization", OAuth.getAuthorizationHeader("yahooapis.jp", message.parameters)).get().response;

]]></execute>
        </select>
    </bindings>
</table>
