Returns an instance of sdk.

@return mixed
Returns a new Google Client instance or FALSE if the config was
incorrect.

@throws \Drupal\social_api\SocialApiException
434157
public function initSdk() {
    $class_name = '\Google_Client';

    if (!class_exists($class_name)) {
      throw new SocialApiException(sprintf('The PHP SDK for Google Services could not be found. Class: %s.', $class_name));
    }

    if (!$this->validateConfig($this->settings)) {
      return FALSE;
    }

    $client = new $class_name();
    $client->setClientId($this->settings->getClientId());
    $client->setClientSecret($this->settings->getClientSecret());

    return $client;
  }
232591
public function getClient()
    {
        if (!$this->client) {
            $client = new GuzzleHelper();

            $this->configureClient($client);

            return $this->client = $client->getClient();
        }

        return $this->client;
    }
184210
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new TwitterMetaProperties();

			self::$instance->init( 'twitter-meta' );
		}

		return self::$instance;
	}
348425
public static function getAccessToken()
    {
        $config = ShopifySDK::$config;

        if(!isset($config['SharedSecret']) || !isset($config['ApiKey'])) {
            throw new SdkException("SharedSecret and ApiKey are required for getting access token. Please check SDK configuration!");
        }

        if(self::verifyShopifyRequest()) {
            $data = array(
                'client_id' => $config['ApiKey'],
                'client_secret' => $config['SharedSecret'],
                'code' => $_GET['code'],
            );

            $response = HttpRequestJson::post($config['AdminUrl'] . 'oauth/access_token', $data);

            return isset($response['access_token']) ? $response['access_token'] : null;
        } else {
            throw new SdkException("This request is not initiated from a valid shopify shop!");
        }
    }
1075606
public function getApiClient()
    {
        if (!$this->_apiClient) {
            $this->_apiClient = new OAuth2([
                'clientId' => $this->clientID,
                'clientSecret' => $this->clientSecret,
                'cacheComponent' => $this->cacheComponent,
            ]);
        }
        return $this->_apiClient;
    }
987852
public static function getOssClient()
    {
        try {
            $ossClient = new OssClient(self::accessKeyId, self::accessKeySecret, self::endpoint, false);
        } catch (OssException $e) {
            printf(__FUNCTION__ . "creating OssClient instance: FAILED\n");
            printf($e->getMessage() . "\n");
            return null;
        }
        return $ossClient;
    }
272817
protected function sdkClient(): Client
    {
        $app = Container::getInstance();

        if ($app->bound('katsana')) {
            return $app->make('katsana');
        }

        return Client::make($this->clientId, $this->clientSecret);
    }
1264976
public function getOAuth2Client()
    {
        if (!$this->oAuth2Client instanceof OAuth2Client) {
            $app = $this->getApp();
            $client = $this->getClient();
            $this->oAuth2Client = new OAuth2Client($app, $client, $this->getDefaultApiVersion());
        }

        return $this->oAuth2Client;
    }
998644
public function getClient(): ClientInterface
    {
        if ($this->client === null) {
            $this->client = new Client();
        }

        return $this->client;
    }
62595
protected function createClient()
    {
        $this->client = new OAuthServer([
            'identifier' => Configuration::get('key'),
            'secret' => Configuration::get('secret'),
            'callback_uri' => Configuration::get('callbackUrl'),
            'name' => Configuration::get('name'),
            'expiration' => Configuration::get('expiration'),
            'scope' => Configuration::get('scope'),
        ]);

        return $this;
    }
355771
public function getClient()
    {
        if (!$this->client instanceof Client) {
            $this->client = new Client([
                "cookies" => true
            ]);
        }
        return $this->client;
    }
1187962
public static function get()
    {
        $instance = new static;

        $request = new Request($instance->functionCall, $instance->module);        

        $instance->fill($request->execute());

        return $instance;
    }
932010
protected function client()
    {
        $dsn = $this->config('dsn');
        if (!$dsn) {
            return null;
        }

        $client = new Raven_Client($dsn);
        $callInstall = $this->config('callInstall');
        if ($callInstall === true) {
            $client->install();
        }

        return $client;
    }
343142
public function getOpenedClient()
    {
        if (!isset($this->openedClient)) {
            $this->openedClient = new ServiceClient();
            $this->openedClient->setApiKey($this->getParameter('apiKey'));

            $newClient = new \Zend\Http\Client(
                null,
                [
                    'adapter'       => 'Zend\Http\Client\Adapter\Socket',
                    'sslverifypeer' => false,
                ]
            );

            $this->openedClient->setHttpClient($newClient);
        }

        return $this->openedClient;
    }
1220703
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new LinkedinProperties();

			self::$instance->init( SnsConnectGlobal::CONFIG_SNS_LINKEDIN );
		}

		return self::$instance;
	}
196957
public function getClient() {
		if ( $this->client === null ) {
			$this->client = $this->newClient();
		}
		return $this->client;
	}
875931
public static function getInstance()
    {
        if (!self::$instance instanceof ClientInterface) {

            $serviceContainer = ServiceContainer::getInstance();

            self::$instance = new static(
                $serviceContainer->get('engine'),
                $serviceContainer->get('procedure_loader'),
                $serviceContainer->get('procedure_compiler'),
                $serviceContainer->get('message_factory')
            );
        }

        return self::$instance;
    }