code: private void onApiReady(Command callback) {
  
          if (isApiLoaded()) {
              callback.execute();
          } else {
              onApiReady.add(callback);
              if (!loadingApi) {
                  loadingApi = true;
                  loadApi();
              }
          }
      }
docs: Adds a callback to be executed once the API is ready. Will be executed right away if the API is already loaded.<p>
  
  @param callback the callback