mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
New build scripts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5282 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
16
source/web/scripts/ajax/dojo/src/rpc/Deferred.js
Normal file
16
source/web/scripts/ajax/dojo/src/rpc/Deferred.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.provide("dojo.rpc.Deferred");
|
||||
dojo.require("dojo.Deferred");
|
||||
|
||||
dojo.deprecated("dojo.rpc.Deferred", "replaced by dojo.Deferred", "0.6");
|
||||
dojo.rpc.Deferred = dojo.Deferred;
|
||||
dojo.rpc.Deferred.prototype = dojo.Deferred.prototype;
|
43
source/web/scripts/ajax/dojo/src/rpc/JotService.js
Normal file
43
source/web/scripts/ajax/dojo/src/rpc/JotService.js
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.provide("dojo.rpc.JotService");
|
||||
dojo.require("dojo.rpc.RpcService"); dojo.require("dojo.rpc.JsonService"); dojo.require("dojo.json"); dojo.rpc.JotService = function(){
|
||||
this.serviceUrl = "/_/jsonrpc";
|
||||
}
|
||||
|
||||
dojo.inherits(dojo.rpc.JotService, dojo.rpc.JsonService);
|
||||
|
||||
dojo.lang.extend(dojo.rpc.JotService, {
|
||||
bind: function(method, parameters, deferredRequestHandler, url){
|
||||
//summary
|
||||
//Jot bind method. Takes remote method, parameters, deferred,
|
||||
//and a url, calls createRequest to make a Jot RPC envelope and
|
||||
//passes that off with bind.
|
||||
dojo.io.bind({
|
||||
url: url||this.serviceUrl,
|
||||
content: {
|
||||
json: this.createRequest(method, parameters)
|
||||
},
|
||||
method: "POST",
|
||||
mimetype: "text/json",
|
||||
load: this.resultCallback(deferredRequestHandler),
|
||||
error: this.errorCallback(deferredRequestHandler),
|
||||
preventCache: true
|
||||
});
|
||||
},
|
||||
|
||||
createRequest: function(method, params){
|
||||
//summary
|
||||
//create the json portion of the Jot request
|
||||
var req = { "params": params, "method": method, "id": this.lastSubmissionId++ };
|
||||
return dojo.json.serialize(req);
|
||||
}
|
||||
});
|
119
source/web/scripts/ajax/dojo/src/rpc/JsonService.js
Normal file
119
source/web/scripts/ajax/dojo/src/rpc/JsonService.js
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.provide("dojo.rpc.JsonService");
|
||||
dojo.require("dojo.rpc.RpcService");
|
||||
dojo.require("dojo.io.*");
|
||||
dojo.require("dojo.json");
|
||||
dojo.require("dojo.lang.common");
|
||||
|
||||
dojo.rpc.JsonService = function(args){
|
||||
// passing just the URL isn't terribly useful. It's expected that at
|
||||
// various times folks will want to specify:
|
||||
// - just the serviceUrl (for use w/ remoteCall())
|
||||
// - the text of the SMD to evaluate
|
||||
// - a raw SMD object
|
||||
// - the SMD URL
|
||||
if(args){
|
||||
if(dojo.lang.isString(args)){
|
||||
// we assume it's an SMD file to be processed, since this was the
|
||||
// earlier function signature
|
||||
|
||||
// FIXME: also accept dojo.uri.Uri objects?
|
||||
this.connect(args);
|
||||
}else{
|
||||
// otherwise we assume it's an arguments object with the following
|
||||
// (optional) properties:
|
||||
// - serviceUrl
|
||||
// - strictArgChecks
|
||||
// - smdUrl
|
||||
// - smdStr
|
||||
// - smdObj
|
||||
if(args["smdUrl"]){
|
||||
this.connect(args.smdUrl);
|
||||
}
|
||||
if(args["smdStr"]){
|
||||
this.processSmd(dj_eval("("+args.smdStr+")"));
|
||||
}
|
||||
if(args["smdObj"]){
|
||||
this.processSmd(args.smdObj);
|
||||
}
|
||||
if(args["serviceUrl"]){
|
||||
this.serviceUrl = args.serviceUrl;
|
||||
}
|
||||
if(typeof args["strictArgChecks"] != "undefined"){
|
||||
this.strictArgChecks = args.strictArgChecks;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dojo.inherits(dojo.rpc.JsonService, dojo.rpc.RpcService);
|
||||
|
||||
dojo.extend(dojo.rpc.JsonService, {
|
||||
|
||||
bustCache: false,
|
||||
|
||||
contentType: "application/json-rpc",
|
||||
|
||||
lastSubmissionId: 0,
|
||||
|
||||
callRemote: function(method, params){
|
||||
//summary
|
||||
// call an arbitrary remote method without requiring it
|
||||
// to be predefined with SMD
|
||||
var deferred = new dojo.Deferred();
|
||||
this.bind(method, params, deferred);
|
||||
return deferred;
|
||||
},
|
||||
|
||||
bind: function(method, parameters, deferredRequestHandler, url){
|
||||
//summary
|
||||
//JSON-RPC bind method. Takes remote method, parameters, deferred,
|
||||
//and a url, calls createRequest to make a JSON-RPC envelope and
|
||||
//passes that off with bind.
|
||||
|
||||
dojo.io.bind({
|
||||
url: url||this.serviceUrl,
|
||||
postContent: this.createRequest(method, parameters),
|
||||
method: "POST",
|
||||
contentType: this.contentType,
|
||||
mimetype: "text/json",
|
||||
load: this.resultCallback(deferredRequestHandler),
|
||||
error: this.errorCallback(deferredRequestHandler),
|
||||
preventCache:this.bustCache
|
||||
});
|
||||
},
|
||||
|
||||
createRequest: function(method, params){
|
||||
//summary
|
||||
//create a JSON-RPC envelope for the request
|
||||
var req = { "params": params, "method": method, "id": ++this.lastSubmissionId };
|
||||
var data = dojo.json.serialize(req);
|
||||
dojo.debug("JsonService: JSON-RPC Request: " + data);
|
||||
return data;
|
||||
},
|
||||
|
||||
parseResults: function(obj){
|
||||
//summary
|
||||
//parse the result envelope and pass the results back to
|
||||
// to the callback function
|
||||
if(!obj){ return; }
|
||||
if (obj["Result"]!=null){
|
||||
return obj["Result"];
|
||||
}else if(obj["result"]!=null){
|
||||
return obj["result"];
|
||||
}else if(obj["ResultSet"]){
|
||||
return obj["ResultSet"];
|
||||
}else{
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
});
|
122
source/web/scripts/ajax/dojo/src/rpc/RpcService.js
Normal file
122
source/web/scripts/ajax/dojo/src/rpc/RpcService.js
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.provide("dojo.rpc.RpcService");
|
||||
dojo.require("dojo.io.*");
|
||||
dojo.require("dojo.json");
|
||||
dojo.require("dojo.lang.func");
|
||||
dojo.require("dojo.Deferred");
|
||||
|
||||
dojo.rpc.RpcService = function(url){
|
||||
// summary
|
||||
// constructor for rpc base class
|
||||
if(url){
|
||||
this.connect(url);
|
||||
}
|
||||
}
|
||||
|
||||
dojo.lang.extend(dojo.rpc.RpcService, {
|
||||
|
||||
strictArgChecks: true,
|
||||
serviceUrl: "",
|
||||
|
||||
parseResults: function(obj){
|
||||
// summary
|
||||
// parse the results coming back from an rpc request.
|
||||
// this base implementation, just returns the full object
|
||||
// subclasses should parse and only return the actual results
|
||||
return obj;
|
||||
},
|
||||
|
||||
errorCallback: function(/* dojo.Deferred */ deferredRequestHandler){
|
||||
// summary
|
||||
// create callback that calls the Deferres errback method
|
||||
return function(type, e){
|
||||
deferredRequestHandler.errback(new Error(e.message));
|
||||
}
|
||||
},
|
||||
|
||||
resultCallback: function(/* dojo.Deferred */ deferredRequestHandler){
|
||||
// summary
|
||||
// create callback that calls the Deferred's callback method
|
||||
var tf = dojo.lang.hitch(this,
|
||||
function(type, obj, e){
|
||||
if (obj["error"]!=null) {
|
||||
var err = new Error(obj.error);
|
||||
err.id = obj.id;
|
||||
deferredRequestHandler.errback(err);
|
||||
} else {
|
||||
var results = this.parseResults(obj);
|
||||
deferredRequestHandler.callback(results);
|
||||
}
|
||||
}
|
||||
);
|
||||
return tf;
|
||||
},
|
||||
|
||||
|
||||
generateMethod: function(/*string*/ method, /*array*/ parameters, /*string*/ url){
|
||||
// summary
|
||||
// generate the local bind methods for the remote object
|
||||
return dojo.lang.hitch(this, function(){
|
||||
var deferredRequestHandler = new dojo.Deferred();
|
||||
|
||||
// if params weren't specified, then we can assume it's varargs
|
||||
if( (this.strictArgChecks) &&
|
||||
(parameters != null) &&
|
||||
(arguments.length != parameters.length)
|
||||
){
|
||||
// put error stuff here, no enough params
|
||||
dojo.raise("Invalid number of parameters for remote method.");
|
||||
} else {
|
||||
this.bind(method, arguments, deferredRequestHandler, url);
|
||||
}
|
||||
|
||||
return deferredRequestHandler;
|
||||
});
|
||||
},
|
||||
|
||||
processSmd: function(/*json*/ object){
|
||||
// summary
|
||||
// callback method for reciept of a smd object. Parse the smd and
|
||||
// generate functions based on the description
|
||||
dojo.debug("RpcService: Processing returned SMD.");
|
||||
if(object.methods){
|
||||
dojo.lang.forEach(object.methods, function(m){
|
||||
if(m && m["name"]){
|
||||
dojo.debug("RpcService: Creating Method: this.", m.name, "()");
|
||||
this[m.name] = this.generateMethod( m.name,
|
||||
m.parameters,
|
||||
m["url"]||m["serviceUrl"]||m["serviceURL"]);
|
||||
if(dojo.lang.isFunction(this[m.name])){
|
||||
dojo.debug("RpcService: Successfully created", m.name, "()");
|
||||
}else{
|
||||
dojo.debug("RpcService: Failed to create", m.name, "()");
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
|
||||
this.serviceUrl = object.serviceUrl||object.serviceURL;
|
||||
dojo.debug("RpcService: Dojo RpcService is ready for use.");
|
||||
},
|
||||
|
||||
connect: function(/*String*/ smdUrl){
|
||||
// summary
|
||||
// connect to a remote url and retrieve a smd object
|
||||
dojo.debug("RpcService: Attempting to load SMD document from:", smdUrl);
|
||||
dojo.io.bind({
|
||||
url: smdUrl,
|
||||
mimetype: "text/json",
|
||||
load: dojo.lang.hitch(this, function(type, object, e){ return this.processSmd(object); }),
|
||||
sync: true
|
||||
});
|
||||
}
|
||||
});
|
59
source/web/scripts/ajax/dojo/src/rpc/YahooService.js
Normal file
59
source/web/scripts/ajax/dojo/src/rpc/YahooService.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.provide("dojo.rpc.YahooService");
|
||||
dojo.require("dojo.rpc.RpcService");
|
||||
dojo.require("dojo.rpc.JsonService");
|
||||
dojo.require("dojo.json");
|
||||
dojo.require("dojo.uri.*");
|
||||
dojo.require("dojo.io.ScriptSrcIO");
|
||||
|
||||
dojo.rpc.YahooService = function(appId){
|
||||
this.appId = appId;
|
||||
if(!appId){
|
||||
this.appId = "dojotoolkit";
|
||||
dojo.debug( "please initialize the YahooService class with your own",
|
||||
"application ID. Using the default may cause problems during",
|
||||
"deployment of your application");
|
||||
}
|
||||
this.connect(dojo.uri.dojoUri("src/rpc/yahoo.smd"));
|
||||
this.strictArgChecks = false;
|
||||
}
|
||||
|
||||
dojo.inherits(dojo.rpc.YahooService, dojo.rpc.JsonService);
|
||||
|
||||
dojo.lang.extend(dojo.rpc.YahooService, {
|
||||
strictArgChecks: false,
|
||||
|
||||
bind: function(method, parameters, deferredRequestHandler, url){
|
||||
//summary
|
||||
//Yahoo RPC bind method. Takes remote method, parameters, deferred,
|
||||
//and a url and sends of a ScriptSrcIO request to connect to Yahoo
|
||||
//services crossplatform
|
||||
var params = parameters;
|
||||
if( (dojo.lang.isArrayLike(parameters))&&
|
||||
(parameters.length == 1)){
|
||||
params = parameters[0];
|
||||
}
|
||||
params.output = "json";
|
||||
params.appid= this.appId;
|
||||
dojo.io.bind({
|
||||
url: url||this.serviceUrl,
|
||||
transport: "ScriptSrcTransport",
|
||||
// FIXME: need to get content interpolation fixed
|
||||
content: params,
|
||||
jsonParamName: "callback",
|
||||
mimetype: "text/json",
|
||||
load: this.resultCallback(deferredRequestHandler),
|
||||
error: this.errorCallback(deferredRequestHandler),
|
||||
preventCache: true
|
||||
});
|
||||
}
|
||||
});
|
14
source/web/scripts/ajax/dojo/src/rpc/__package__.js
Normal file
14
source/web/scripts/ajax/dojo/src/rpc/__package__.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.kwCompoundRequire({
|
||||
common: [["dojo.rpc.JsonService", false, false]]
|
||||
});
|
||||
dojo.provide("dojo.rpc.*");
|
289
source/web/scripts/ajax/dojo/src/rpc/yahoo.smd
Normal file
289
source/web/scripts/ajax/dojo/src/rpc/yahoo.smd
Normal file
@@ -0,0 +1,289 @@
|
||||
{
|
||||
"SMDVersion":".1",
|
||||
"objectName":"yahoo",
|
||||
"serviceType":"JSON-P",
|
||||
"methods":[
|
||||
//
|
||||
// MAPS
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/maps/rest/V1/mapImage.html
|
||||
"name":"mapImage",
|
||||
"serviceURL": "http://api.local.yahoo.com/MapsService/V1/mapImage",
|
||||
"parameters":[
|
||||
{ "name":"street", "type":"STRING" },
|
||||
{ "name":"city", "type":"STRING" },
|
||||
{ "name":"zip", "type":"INTEGER" },
|
||||
{ "name":"location", "type":"STRING" },
|
||||
{ "name":"longitude", "type":"FLOAT" },
|
||||
{ "name":"latitude", "type":"FLOAT" },
|
||||
{ "name":"image_type", "type":"STRING" },
|
||||
{ "name":"image_width", "type":"INTEGER" },
|
||||
{ "name":"image_height", "type":"INTEGER" },
|
||||
{ "name":"zoom", "type":"INTEGER" },
|
||||
{ "name":"radius", "type":"INTEGER" }
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/traffic/rest/V1/index.html
|
||||
"name":"trafficData",
|
||||
"serviceURL": "http://api.local.yahoo.com/MapsService/V1/trafficData",
|
||||
"parameters":[
|
||||
{ "name":"street", "type":"STRING" },
|
||||
{ "name":"city", "type":"STRING" },
|
||||
{ "name":"zip", "type":"INTEGER" },
|
||||
{ "name":"location", "type":"STRING" },
|
||||
{ "name":"longitude", "type":"FLOAT" },
|
||||
{ "name":"latitude", "type":"FLOAT" },
|
||||
{ "name":"severity", "type":"INTEGER" },
|
||||
{ "name":"include_map", "type":"INTEGER" },
|
||||
{ "name":"image_type", "type":"STRING" },
|
||||
{ "name":"image_width", "type":"INTEGER" },
|
||||
{ "name":"image_height", "type":"INTEGER" },
|
||||
{ "name":"zoom", "type":"INTEGER" },
|
||||
{ "name":"radius", "type":"INTEGER" }
|
||||
]
|
||||
},
|
||||
/*
|
||||
// Yahoo's geocoding service is f'd for JSON and Y! advises that it
|
||||
// may not be returning
|
||||
{
|
||||
// http://developer.yahoo.com/maps/rest/V1/geocode.html
|
||||
"name":"geocode",
|
||||
"serviceURL": "http://api.local.yahoo.com/MapsService/V1/geocode",
|
||||
"parameters":[
|
||||
{ "name":"street", "type":"STRING" },
|
||||
{ "name":"city", "type":"STRING" },
|
||||
{ "name":"zip", "type":"INTEGER" },
|
||||
{ "name":"location", "type":"STRING" }
|
||||
]
|
||||
},
|
||||
*/
|
||||
//
|
||||
// LOCAL SEARCH
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/search/local/V3/localSearch.html
|
||||
"name":"localSearch",
|
||||
"serviceURL": "http://api.local.yahoo.com/LocalSearchService/V3/localSearch",
|
||||
"parameters":[
|
||||
{ "name":"street", "type":"STRING" },
|
||||
{ "name":"city", "type":"STRING" },
|
||||
{ "name":"zip", "type":"INTEGER" },
|
||||
{ "name":"location", "type":"STRING" },
|
||||
{ "name":"listing_id", "type":"STRING" },
|
||||
{ "name":"sort", "type":"STRING" }, // "relevence", "title", "distance", or "rating"
|
||||
{ "name":"start", "type":"INTEGER" },
|
||||
{ "name":"radius", "type":"FLOAT" },
|
||||
{ "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10
|
||||
{ "name":"longitude", "type":"FLOAT" },
|
||||
{ "name":"latitude", "type":"FLOAT" },
|
||||
{ "name":"category", "type":"INTEGER" },
|
||||
{ "name":"omit_category", "type":"INTEGER" },
|
||||
{ "name":"minimum_rating", "type":"INTEGER" }
|
||||
]
|
||||
},
|
||||
//
|
||||
// WEB SEARCH
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/search/web/V1/webSearch.html
|
||||
"name":"webSearch",
|
||||
"serviceURL": "http://api.search.yahoo.com/WebSearchService/V1/webSearch",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // defaults to "all"
|
||||
{ "name":"region", "type":"STRING" }, // defaults to "us"
|
||||
{ "name":"results", "type":"INTEGER" }, // defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" }, // defaults to 1
|
||||
{ "name":"format", "type":"STRING" }, // defaults to "any", can be "html", "msword", "pdf", "ppt", "rst", "txt", or "xls"
|
||||
{ "name":"adult_ok", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"similar_ok", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"language", "type":"STRING" }, // defaults to null
|
||||
{ "name":"country", "type":"STRING" }, // defaults to null
|
||||
{ "name":"site", "type":"STRING" }, // defaults to null
|
||||
{ "name":"subscription", "type":"STRING" }, // defaults to null
|
||||
{ "name":"license", "type":"STRING" } // defaults to "any"
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/web/V1/spellingSuggestion.html
|
||||
"name":"spellingSuggestion",
|
||||
"serviceURL": "http://api.search.yahoo.com/WebSearchService/V1/spellingSuggestion",
|
||||
"parameters":[ { "name":"query", "type":"STRING" } ]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/web/V1/relatedSuggestion.html
|
||||
"name":"spellingSuggestion",
|
||||
"serviceURL": "http://api.search.yahoo.com/WebSearchService/V1/relatedSuggestion",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"results", "type":"INTEGER" } // 1-50, defaults to 10
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/content/V1/termExtraction.html
|
||||
"name":"termExtraction",
|
||||
"serviceURL": "http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"context", "type":"STRING" },
|
||||
{ "name":"results", "type":"INTEGER" } // 1-50, defaults to 10
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/web/V1/contextSearch.html
|
||||
"name":"contextSearch",
|
||||
"serviceURL": "http://search.yahooapis.com/WebSearchService/V1/contextSearch",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"context", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // defaults to "all"
|
||||
{ "name":"results", "type":"INTEGER" }, // defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" }, // defaults to 1
|
||||
{ "name":"format", "type":"STRING" }, // defaults to "any", can be "html", "msword", "pdf", "ppt", "rst", "txt", or "xls"
|
||||
{ "name":"adult_ok", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"similar_ok", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"language", "type":"STRING" }, // defaults to null
|
||||
{ "name":"country", "type":"STRING" }, // defaults to null
|
||||
{ "name":"site", "type":"STRING" }, // defaults to null
|
||||
{ "name":"license", "type":"STRING" } // defaults to "any", could be "cc_any", "cc_commercial", "cc_modifiable"
|
||||
]
|
||||
},
|
||||
//
|
||||
// IMAGE SEARCH
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/search/image/V1/imageSearch.html
|
||||
"name":"imageSearch",
|
||||
"serviceURL": "http://api.search.yahoo.com/ImageSearchService/V1/imageSearch",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // defaults to "all", can by "any" or "phrase"
|
||||
{ "name":"results", "type":"INTEGER" }, // defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" }, // defaults to 1
|
||||
{ "name":"format", "type":"STRING" }, // defaults to "any", can be "bmp", "gif", "jpeg", or "png"
|
||||
{ "name":"adult_ok", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"coloration", "type":"STRING" }, // "any", "color", or "bw"
|
||||
{ "name":"site", "type":"STRING" } // defaults to null
|
||||
]
|
||||
},
|
||||
//
|
||||
// SITE EXPLORER
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/search/siteexplorer/V1/inlinkData.html
|
||||
"name":"inlinkData",
|
||||
"serviceURL": "http://api.search.yahoo.com/SiteExplorerService/V1/inlinkData",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // defaults to "all", can by "any" or "phrase"
|
||||
{ "name":"entire_site", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"omit_inlinks", "type":"STRING" }, // "domain" or "subdomain", defaults to null
|
||||
{ "name":"results", "type":"INTEGER" }, // defaults to 50
|
||||
{ "name":"start", "type":"INTEGER" }, // defaults to 1
|
||||
{ "name":"site", "type":"STRING" } // defaults to null
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/siteexplorer/V1/pageData.html
|
||||
"name":"pageData",
|
||||
"serviceURL": "http://api.search.yahoo.com/SiteExplorerService/V1/pageData",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // defaults to "all", can by "any" or "phrase"
|
||||
{ "name":"domain_only", "type":"INTEGER" }, // defaults to null
|
||||
{ "name":"results", "type":"INTEGER" }, // defaults to 50
|
||||
{ "name":"start", "type":"INTEGER" }, // defaults to 1
|
||||
{ "name":"site", "type":"STRING" } // defaults to null
|
||||
]
|
||||
},
|
||||
//
|
||||
// MUSIC SEARCH
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/search/audio/V1/artistSearch.html
|
||||
"name":"artistSearch",
|
||||
"serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/artistSearch",
|
||||
"parameters":[
|
||||
{ "name":"artist", "type":"STRING" },
|
||||
{ "name":"artistid", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // "all", "any", or "phrase"
|
||||
{ "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" } // defaults to 1
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/audio/V1/albumSearch.html
|
||||
"name":"albumSearch",
|
||||
"serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/albumSearch",
|
||||
"parameters":[
|
||||
{ "name":"artist", "type":"STRING" },
|
||||
{ "name":"artistid", "type":"STRING" },
|
||||
{ "name":"album", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // "all", "any", or "phrase"
|
||||
{ "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" } // defaults to 1
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/audio/V1/songSearch.html
|
||||
"name":"songSearch",
|
||||
"serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/songSearch",
|
||||
"parameters":[
|
||||
{ "name":"artist", "type":"STRING" },
|
||||
{ "name":"artistid", "type":"STRING" },
|
||||
{ "name":"album", "type":"STRING" },
|
||||
{ "name":"albumid", "type":"STRING" },
|
||||
{ "name":"song", "type":"STRING" },
|
||||
{ "name":"songid", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // "all", "any", or "phrase"
|
||||
{ "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" } // defaults to 1
|
||||
]
|
||||
},
|
||||
{
|
||||
// http://developer.yahoo.com/search/audio/V1/songDownloadLocation.html
|
||||
"name":"songDownloadLocation",
|
||||
"serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/songDownloadLocation",
|
||||
"parameters":[
|
||||
{ "name":"songid", "type":"STRING" },
|
||||
// "source" can contain:
|
||||
// audiolunchbox artistdirect buymusic dmusic
|
||||
// emusic epitonic garageband itunes yahoo
|
||||
// livedownloads mp34u msn musicmatch mapster passalong
|
||||
// rhapsody soundclick theweb
|
||||
{ "name":"source", "type":"STRING" },
|
||||
{ "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" } // defaults to 1
|
||||
]
|
||||
},
|
||||
//
|
||||
// NEWS SEARCH
|
||||
//
|
||||
{
|
||||
// http://developer.yahoo.com/search/news/V1/newsSearch.html
|
||||
"name":"newsSearch",
|
||||
"serviceURL": "http://api.search.yahoo.com/NewsSearchService/V1/newsSearch",
|
||||
"parameters":[
|
||||
{ "name":"query", "type":"STRING" },
|
||||
{ "name":"type", "type":"STRING" }, // defaults to "all"
|
||||
{ "name":"results", "type":"INTEGER" }, // defaults to 10
|
||||
{ "name":"start", "type":"INTEGER" }, // defaults to 1
|
||||
{ "name":"sort", "type":"STRING" }, // "rank" or "date"
|
||||
{ "name":"language", "type":"STRING" }, // defaults to null
|
||||
{ "name":"site", "type":"STRING" } // defaults to null
|
||||
]
|
||||
}
|
||||
/*
|
||||
{
|
||||
//
|
||||
"name":"",
|
||||
"serviceURL": "",
|
||||
"parameters":[
|
||||
{ "name":"street", "type":"STRING" },
|
||||
]
|
||||
}
|
||||
*/
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user