File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 5555@homepage http://polymerlabs.github.io/google-apis
5656-->
5757< polymer-element name ="google-api-loader "
58- attributes ="name version "
58+ attributes ="name version appId "
5959 extends ="google-client-api "
6060 on-api-load ="{{doneLoadingClient}} ">
6161< script >
102102 */
103103 version : '' ,
104104
105+ /**
106+ * App Engine application ID for loading a Google Cloud Endpoints API.
107+ * @attribute appId
108+ * @type string
109+ */
110+
105111 // Used to fix events potentially being fired multiple times by
106112 // core-shared-lib.
107113 waiting : false ,
187193 this . fireError ( ) ;
188194 // Otherwise, looks like we're loading a new API.
189195 } else {
196+ var root ;
197+ if ( this . appId ) {
198+ root = 'https://' + this . appId + '.appspot.com/_ah/api' ;
199+ }
190200 statuses_ [ this . name ] = 'loading' ;
191201 loaders_ [ this . name ] = this ;
192202 gapi . client . load ( this . name , this . version ,
193- this . handleLoadResponse . bind ( this ) ) ;
203+ this . handleLoadResponse . bind ( this ) , root ) ;
194204 }
195205 }
196206 }
You can’t perform that action at this time.
0 commit comments