mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
v0.1.64
This commit is contained in:
parent
e102acd87e
commit
2f1310e94e
@ -70,8 +70,8 @@ l.self.location.protocol,f=g.substr(0,g.length-1);e=!Wd.test(f?f.toLowerCase():"
|
||||
e.message,void 0)}}},be=function(a){a.a&&a.jb&&(a.a.ontimeout=null);q(a.cb)&&(l.clearTimeout(a.cb),a.cb=null)};E.prototype.hc=function(){return!!this.a};var he=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<he(this)?this.a.status:-1}catch(a){return-1}};E.prototype.getResponseHeader=function(a){return this.a&&4==he(this)?this.a.getResponseHeader(a):void 0};var ae=function(a,b){return b+" ["+a.kc+" "+a.Ta+" "+a.getStatus()+"]"};var ie=function(a,b,c){this.g=this.i=null;this.I=a||null;this.Zc=!!c},je=function(a){a.i||(a.i=new rd,a.g=0,a.I&&Od(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=ie.prototype;h.u=function(){je(this);return this.g};h.add=function(a,b){je(this);this.I=null;a=ke(this,a);var c=this.i.get(a);c||this.i.set(a,c=[]);c.push(b);this.g++;return this};h.remove=function(a){je(this);a=ke(this,a);return this.i.Y(a)?(this.I=null,this.g-=this.i.get(a).length,this.i.remove(a)):!1};
|
||||
h.clear=function(){this.i=this.I=null;this.g=0};h.isEmpty=function(){je(this);return 0==this.g};h.Y=function(a){je(this);a=ke(this,a);return this.i.Y(a)};h.N=function(){je(this);for(var a=this.i.w(),b=this.i.N(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.w=function(a){je(this);var b=[];if(p(a))this.Y(a)&&(b=$a(b,this.i.get(ke(this,a))));else{a=this.i.w();for(var c=0;c<a.length;c++)b=$a(b,a[c])}return b};
|
||||
h.set=function(a,b){je(this);this.I=null;a=ke(this,a);this.Y(a)&&(this.g-=this.i.get(a).length);this.i.set(a,[b]);this.g++;return this};h.get=function(a,b){var c=a?this.w(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.I)return this.I;if(!this.i)return"";for(var a=[],b=this.i.N(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.w(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.I=a.join("&")};
|
||||
h.clone=function(){var a=new ie;a.I=this.I;this.i&&(a.i=this.i.clone(),a.g=this.g);return a};var ke=function(a,b){var c=String(b);a.Zc&&(c=c.toLowerCase());return c};v("ee.data.authenticate",function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine.readonly"];d&&(cb(f,d),eb(f));le=a;me=f;null===a?ne=null:oe(function(){pe(b,c,e||ia(qe,b,c))})});var qe=function(a,b){l.gapi.auth.authorize({client_id:le,immediate:!1,scope:me.join(" ")},ia(re,a,b))};v("ee.data.authenticateViaPopup",qe);
|
||||
v("ee.data.setAuthToken",function(a,b,c,d,e,f,g){var k=["https://www.googleapis.com/auth/earthengine.readonly"];e&&(cb(k,e),eb(k));le=a;me=k;var y={token_type:b,access_token:c,state:k.join(" "),expires_in:d};re(void 0,void 0,y);!1===g?f&&f():oe(function(){l.gapi.auth.setToken(y);f&&f()})});var pe=function(a,b,c){l.gapi.auth.authorize({client_id:le,immediate:!0,scope:me.join(" ")},function(d){"immediate_failed"==d.error&&c?c():re(a,b,d)})};v("ee.data.getAuthToken",function(){return ne});
|
||||
h.clone=function(){var a=new ie;a.I=this.I;this.i&&(a.i=this.i.clone(),a.g=this.g);return a};var ke=function(a,b){var c=String(b);a.Zc&&(c=c.toLowerCase());return c};v("ee.data.authenticate",function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(cb(f,d),eb(f));le=a;me=f;null===a?ne=null:oe(function(){pe(b,c,e||ia(qe,b,c))})});var qe=function(a,b){l.gapi.auth.authorize({client_id:le,immediate:!1,scope:me.join(" ")},ia(re,a,b))};v("ee.data.authenticateViaPopup",qe);
|
||||
v("ee.data.setAuthToken",function(a,b,c,d,e,f,g){var k=["https://www.googleapis.com/auth/earthengine"];e&&(cb(k,e),eb(k));le=a;me=k;var y={token_type:b,access_token:c,state:k.join(" "),expires_in:d};re(void 0,void 0,y);!1===g?f&&f():oe(function(){l.gapi.auth.setToken(y);f&&f()})});var pe=function(a,b,c){l.gapi.auth.authorize({client_id:le,immediate:!0,scope:me.join(" ")},function(d){"immediate_failed"==d.error&&c?c():re(a,b,d)})};v("ee.data.getAuthToken",function(){return ne});
|
||||
v("ee.data.clearAuthToken",function(){ne=null});v("ee.data.getAuthClientId",function(){return le});v("ee.data.getAuthScopes",function(){return me});var we=function(a,b,c){null!=a?se=a:te||(se="https://earthengine.googleapis.com/api");null!=b?ue=b:te||(ue="https://earthengine.googleapis.com");m(c)&&(ve=c);te=!0};v("ee.data.setDeadline",function(a){Zd=a});v("ee.data.setParamAugmenter",function(a){xe=a||fb});v("ee.data.getApiBaseUrl",function(){return se});v("ee.data.getTileBaseUrl",function(){return ue});
|
||||
v("ee.data.getXsrfToken",function(){return ve});var ye=function(a,b){a=ta(a);return F("/mapid",G(a),b)};v("ee.data.getMapId",ye);v("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[ue,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var ze=function(a,b){a=ta(a);return F("/value",G(a),b)};v("ee.data.getValue",ze);var Ae=function(a,b){a=ta(a);n(a.size)&&(a.size=a.size.join("x"));var c=G(a).add("getid","1");return F("/thumb",c,b)};v("ee.data.getThumbId",Ae);
|
||||
var Be=function(a){return ue+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Be);var Ce=function(a,b){a=ta(a);return F("/download",G(a),b)};v("ee.data.getDownloadId",Ce);var De=function(a){return ue+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",De);var Ee=function(a,b){a=ta(a);return F("/table",G(a),b)};v("ee.data.getTableDownloadId",Ee);var Fe=function(a){return ue+"/api/table?docid="+a.docid+"&token="+a.token};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -48,12 +48,6 @@ goog.moduleLoaderState_ = null;
|
||||
goog.isInModuleLoader_ = function() {
|
||||
return null != goog.moduleLoaderState_;
|
||||
};
|
||||
goog.module.declareTestMethods = function() {
|
||||
if (!goog.isInModuleLoader_()) {
|
||||
throw Error("goog.module.declareTestMethods must be called from within a goog.module");
|
||||
}
|
||||
goog.moduleLoaderState_.declareTestMethods = !0;
|
||||
};
|
||||
goog.module.declareLegacyNamespace = function() {
|
||||
goog.moduleLoaderState_.declareLegacyNamespace = !0;
|
||||
};
|
||||
@ -122,7 +116,7 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
||||
var doc = goog.global.document;
|
||||
return "undefined" != typeof doc && "write" in doc;
|
||||
}, goog.findBasePath_ = function() {
|
||||
if (goog.global.CLOSURE_BASE_PATH) {
|
||||
if (goog.isDef(goog.global.CLOSURE_BASE_PATH)) {
|
||||
goog.basePath = goog.global.CLOSURE_BASE_PATH;
|
||||
} else {
|
||||
if (goog.inHtmlDocument_()) {
|
||||
@ -137,7 +131,7 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
||||
}
|
||||
}, goog.importScript_ = function(src, opt_sourceText) {
|
||||
(goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_)(src, opt_sourceText) && (goog.dependencies_.written[src] = !0);
|
||||
}, goog.IS_OLD_IE_ = !goog.global.atob && goog.global.document && goog.global.document.all, goog.importModule_ = function(src) {
|
||||
}, goog.IS_OLD_IE_ = !(goog.global.atob || !goog.global.document || !goog.global.document.all), goog.importModule_ = function(src) {
|
||||
goog.importScript_("", 'goog.retrieveAndExecModule_("' + src + '");') && (goog.dependencies_.written[src] = !0);
|
||||
}, goog.queuedModules_ = [], goog.wrapModule_ = function(srcUrl, scriptText) {
|
||||
return goog.LOAD_MODULE_USING_EVAL && goog.isDef(goog.global.JSON) ? "goog.loadModule(" + goog.global.JSON.stringify(scriptText + "\n//# sourceURL=" + srcUrl + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + scriptText + "\n;return exports});\n//# sourceURL=" + srcUrl + "\n";
|
||||
@ -174,7 +168,7 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
||||
}, goog.loadModule = function(moduleDef) {
|
||||
var previousState = goog.moduleLoaderState_;
|
||||
try {
|
||||
goog.moduleLoaderState_ = {moduleName:void 0, declareTestMethods:!1};
|
||||
goog.moduleLoaderState_ = {moduleName:void 0};
|
||||
var exports;
|
||||
if (goog.isFunction(moduleDef)) {
|
||||
exports = moduleDef.call(goog.global, {});
|
||||
@ -191,18 +185,11 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
||||
}
|
||||
goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(moduleName, exports) : goog.SEAL_MODULE_EXPORTS && Object.seal && Object.seal(exports);
|
||||
goog.loadedModules_[moduleName] = exports;
|
||||
if (goog.moduleLoaderState_.declareTestMethods) {
|
||||
for (var entry in exports) {
|
||||
if (0 === entry.indexOf("test", 0) || "tearDown" == entry || "setUp" == entry || "setUpPage" == entry || "tearDownPage" == entry) {
|
||||
goog.global[entry] = exports[entry];
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
goog.moduleLoaderState_ = previousState;
|
||||
}
|
||||
}, goog.loadModuleFromSource_ = function(source) {
|
||||
eval(source);
|
||||
}, goog.loadModuleFromSource_ = function(JSCompiler_OptimizeArgumentsArray_p0) {
|
||||
eval(JSCompiler_OptimizeArgumentsArray_p0);
|
||||
return {};
|
||||
}, goog.writeScriptSrcNode_ = function(src) {
|
||||
goog.global.document.write('<script type="text/javascript" src="' + src + '">\x3c/script>');
|
||||
@ -8426,7 +8413,7 @@ ee.data.paramAugmenter_ = goog.functions.identity;
|
||||
ee.data.authToken_ = null;
|
||||
ee.data.authClientId_ = null;
|
||||
ee.data.authScopes_ = [];
|
||||
ee.data.AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine.readonly";
|
||||
ee.data.AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine";
|
||||
ee.data.AUTH_LIBRARY_URL_ = "https://apis.google.com/js/client.js";
|
||||
ee.data.initialized_ = !1;
|
||||
ee.data.deadlineMs_ = 0;
|
||||
|
||||
@ -1882,7 +1882,7 @@ ee.data.authScopes_ = [];
|
||||
/**
|
||||
* @private @const {string} The OAuth scope for the EE API.
|
||||
*/
|
||||
ee.data.AUTH_SCOPE_ = 'https://www.googleapis.com/auth/earthengine.readonly';
|
||||
ee.data.AUTH_SCOPE_ = 'https://www.googleapis.com/auth/earthengine';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"""The EE Python library."""
|
||||
|
||||
|
||||
__version__ = '0.1.63'
|
||||
__version__ = '0.1.64'
|
||||
|
||||
# Using lowercase function naming to match the JavaScript names.
|
||||
# pylint: disable=g-bad-name
|
||||
|
||||
@ -5,7 +5,7 @@ import os
|
||||
|
||||
|
||||
class OAuthInfo(object):
|
||||
SCOPE = 'https://www.googleapis.com/auth/earthengine.readonly'
|
||||
SCOPE = 'https://www.googleapis.com/auth/earthengine'
|
||||
CLIENT_ID = ('517222506229-vsmmajv00ul0bs7p89v5m89qs8eb9359.'
|
||||
'apps.googleusercontent.com')
|
||||
CLIENT_SECRET = 'RUP0RZ6e0pPhDzsqIJ7KlNd1'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user