예제 #1
0
 def publisher_api(self):
     """Helper for publisher-related API calls."""
     if self._publisher_api is None:
         if self._use_gax:
             generated = make_gax_publisher_api(self._connection)
             self._publisher_api = GAXPublisherAPI(generated, self)
         else:
             self._publisher_api = JSONPublisherAPI(self)
     return self._publisher_api
예제 #2
0
 def publisher_api(self):
     """Helper for publisher-related API calls."""
     if self._publisher_api is None:
         if _USE_GAX:
             generated = GeneratedPublisherAPI()
             self._publisher_api = GAXPublisherAPI(generated)
         else:
             self._publisher_api = JSONPublisherAPI(self.connection)
     return self._publisher_api
예제 #3
0
 def publisher_api(self):
     """Helper for publisher-related API calls."""
     if self._publisher_api is None:
         if self._use_grpc:
             if self._connection.in_emulator:
                 generated = make_gax_publisher_api(
                     host=self._connection.host)
             else:
                 generated = make_gax_publisher_api(
                     credentials=self._credentials)
             self._publisher_api = GAXPublisherAPI(generated, self)
         else:
             self._publisher_api = JSONPublisherAPI(self)
     return self._publisher_api