Get the google data client.
13468
def get_client(self, email=None, password=None, **__):
        """"""
        if self.client is not None:
            return self.client
        return Auth(email, password)
599996
def get_results(self, client):
        
        data = self._request('GET', '/results/{}'.format(client))
        return data.json()
622754
function get_client() {
		if (client_cache) return Promise.resolve(client_cache);
		return make_promise(
			cypher.createClient.bind(cypher, connection_string, connection_opts)
		).then(cache_client);
	}
1025275
async def get_data(self, resource):
        """"""
        url = '{}{}'.format(
            self.base_url, self.endpoint.format(resource=resource))

        try:
            with async_timeout.timeout(5, loop=self._loop):
                response = await self._session.get(url)

            _LOGGER.info(
                "Response from Netdata: %s", response.status)
            data = await response.json()
            _LOGGER.debug(data)
            self.values = {k: v for k, v in zip(
                data['labels'], data['data'][0])}

        except (asyncio.TimeoutError, aiohttp.ClientError, socket.gaierror):
            _LOGGER.error("Can not load data from Netdata")
            raise exceptions.NetdataConnectionError()
1052093
def _get_client(self):
        
        return (_oss.StsAuth if 'security_token' in self._storage_parameters
                else _oss.Auth if self._storage_parameters
                else _oss.AnonymousAuth)(**self._storage_parameters)
619232
def get_client(host=None, port=None, username=None, password=None, enable_logging=True):
    """"""

    host = utils.first_true(
        [host, config["bel_api"]["servers"]["arangodb_host"], "localhost"]
    )
    port = utils.first_true([port, config["bel_api"]["servers"]["arangodb_port"], 8529])
    username = utils.first_true(
        [username, config["bel_api"]["servers"]["arangodb_username"], ""]
    )
    password = utils.first_true(
        [
            password,
            config.get(
                "secrets",
                config["secrets"]["bel_api"]["servers"].get("arangodb_password"),
            ),
            "",
        ]
    )

    client = arango.client.ArangoClient(
        protocol=config["bel_api"]["servers"]["arangodb_protocol"], host=host, port=port
    )

    return client
366693
public com.google.api.ads.admanager.axis.v201811.AudienceSegmentDataProvider getDataProvider() {
        return dataProvider;
    }
980509
def _get_client(region, key, keyid, profile):
    '''
    
    '''
    session = _get_session(region, key, keyid, profile)
    if not session:
        log.error("Failed to get datapipeline client.")
        return None

    return session.client('datapipeline')
742954
def get_api_client():
    """"""
    with _api_lock:
        global _api_client
        if not _api_client:
            conf_file = os.path.join(os.environ.get("HOME"),
                                     ".python-grid5000.yaml")
            _api_client = Client.from_yaml(conf_file)

        return _api_client
599206
async def get(self, cmd, daap_data=True, timeout=None, **args):
        """"""
        def _get_request():
            return self.http.get_data(
                self._mkurl(cmd, *args),
                headers=_DMAP_HEADERS,
                timeout=timeout)

        await self._assure_logged_in()
        return await self._do(_get_request, is_daap=daap_data)
137052
def get(self, project):
        """"""
        try:
            data = self.request(project + '/')
        except:
            raise
        if not isinstance(data, clam.common.data.CLAMData):
            raise Exception("Unable to retrieve CLAM Data")
        else:
            return data
190719
def get(self, **params):
        '''
        
        '''
        return self.client.get('/v1/reference-data/locations/{0}'
                               .format(self.location_id), **params)
888137
static function getGoogleClient($logger_name = null) {
        if (is_null($logger_name)) {
            $logger_name = "Google_Client at " . Util::getModuleId();
        }
        $client = new \Google_Client();
        $client->useApplicationDefaultCredentials();
        $client->setApplicationName(Util::getModuleId() . "@" . Util::getApplicationId());
        $client->setLogger(Logger::create($logger_name));
        if (Util::isDevServer()) {
            $http = self::getWindowsCompliantHttpClient();
            $client->setHttpClient($http);
        }
        return $client;
    }
756162
def data_request(self, payload, timeout=TIMEOUT):
        """"""
        request_url = self.base_url + "/data_request"
        return requests.get(request_url, timeout=timeout, params=payload)
43021
def get_client(self, request=None):
        """"""

        if not isinstance(request, oauth.Request):
            request = self.get_oauth_request()
        client_key = request.get_parameter('oauth_consumer_key')
        if not client_key:
            raise Exception('Missing "oauth_consumer_key" parameter in ' \
                'OAuth "Authorization" header')

        client = models.Client.get_by_key_name(client_key)
        if not client:
            raise Exception('Client "%s" not found.' % client_key)

        return client
906079
def fetch_data(self, **var):
        """"""
        varstr = ','.join(name + self._convert_indices(ind)
                          for name, ind in var.items())
        query = self.query().add_query_parameter(req='data', var=varstr)
        return self._fetch(query)
104909
def fetch(self, resource_data=None):
        """"""
        try:
            if not resource_data:
                resource_data = self._client._get(self._url + ".json")

            for name in self._allowed_attributes:
                setattr(self, name, resource_data.get(name, None))

            if 'sid' in self._allowed_attributes:
                self._short_url = self.sid
            else:
                self._short_url = ""

            self._populated = True
            self._resource_data = resource_data
        except exceptions.RequestError, e:
            if not e.http_code == 405:
                print e
                raise