lib/API/TrackIdentifyApi.php
/**
     * Create request for operation 'identifyGet'
     *
     * @param  string $data String representation of base64 encoded JSON object (required)
     *
     * @throws \InvalidArgumentException
     * @return \GuzzleHttp\Psr7\Request
     */
Create request for operation 'identifyGet'
@param  string $data String representation of base64 encoded JSON object (required)


Create request for operation ' identifyGet ' @param string $data String representation of base64 encoded JSON object ( required )
public function identifyGetRequest($data)
    {
        if ($data === null || (is_array($data) && count($data) === 0)) {
            throw new \InvalidArgumentException(
                'Missing the required parameter $data when calling identifyGet'
            );
        }
        $resourcePath = '/identify';
        $formParams = [];
        $queryParams = [];
        $headerParams = [];
        $httpBody = '';
        $multipart = false;
        if ($data !== null) {
            if('form' === 'form' && is_array($data)) {
                foreach($data as $key => $value) {
                    $queryParams[$key] = $value;
                }
            }
            else {
                $queryParams['data'] = $data;
            }
        }
        if ($multipart) {
            $headers = $this->headerSelector->selectHeadersForMultipart(
                ['text/html']
            );
        } else {
            $headers = $this->headerSelector->selectHeaders(
                ['text/html'],
                []
            );
        }
        if (count($formParams) > 0) {
            if ($multipart) {
                $multipartContents = [];
                foreach ($formParams as $formParamName => $formParamValue) {
                    $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
                    foreach ($formParamValueItems as $formParamValueItem) {
                        $multipartContents[] = [
                            'name' => $formParamName,
                            'contents' => $formParamValueItem
                        ];
                    }
                }
                $httpBody = new MultipartStream($multipartContents);
            } elseif ($headers['Content-Type'] === 'application/json') {
                $httpBody = \GuzzleHttp\json_encode($formParams);
            } else {
                $httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
            }
        }
        $defaultHeaders = [];
        if ($this->config->getUserAgent()) {
            $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
        }
        $headers = array_merge(
            $defaultHeaders,
            $headerParams,
            $headers
        );
        $query = \GuzzleHttp\Psr7\Query::build($queryParams);
        return new Request(
            'GET',
            $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
            $headers,
            $httpBody
        );
    }
public function identifyGetRequest ( $ data ) { if ( $ data === null || ( is_array ( $ data ) && count ( $ data ) === 0 ) ) { throw new \ InvalidArgumentException ( 'Missing the required parameter $data when calling identifyGet' ) ; } $ resourcePath = '/identify' ; $ formParams = [ ] ; $ queryParams = [ ] ; $ headerParams = [ ] ; $ httpBody = '' ; $ multipart = false ; if ( $ data !== null ) { if ( 'form' === 'form' && is_array ( $ data ) ) { foreach ( $ data as $ key => $ value ) { $ queryParams [ $ key ] = $ value ; } } else { $ queryParams [ 'data' ] = $ data ; } } if ( $ multipart ) { $ headers = $ this -> headerSelector -> selectHeadersForMultipart ( [ 'text/html' ] ) ; } else { $ headers = $ this -> headerSelector -> selectHeaders ( [ 'text/html' ] , [ ] ) ; } if ( count ( $ formParams ) > 0 ) { if ( $ multipart ) { $ multipartContents = [ ] ; foreach ( $ formParams as $ formParamName => $ formParamValue ) { $ formParamValueItems = is_array ( $ formParamValue ) ? $ formParamValue : [ $ formParamValue ] ; foreach ( $ formParamValueItems as $ formParamValueItem ) { $ multipartContents [ ] = [ 'name' => $ formParamName , 'contents' => $ formParamValueItem ] ; } } $ httpBody = new MultipartStream ( $ multipartContents ) ; } elseif ( $ headers [ 'Content-Type' ] === 'application/json' ) { $ httpBody = \ GuzzleHttp \ json_encode ( $ formParams ) ; } else { $ httpBody = \ GuzzleHttp \ Psr7 \ Query :: build ( $ formParams ) ; } } $ defaultHeaders = [ ] ; if ( $ this -> config -> getUserAgent ( ) ) { $ defaultHeaders [ 'User-Agent' ] = $ this -> config -> getUserAgent ( ) ; } $ headers = array_merge ( $ defaultHeaders , $ headerParams , $ headers ) ; $ query = \ GuzzleHttp \ Psr7 \ Query :: build ( $ queryParams ) ; return new Request ( 'GET' , $ this -> config -> getHost ( ) . $ resourcePath . ( $ query ? " ? { $ query } " : '' ) , $ headers , $ httpBody ) ; }
Create request for operation 'identifyGet'
 @param  string $data String representation of base64 encoded JSON object (required)
Create request for operation ' identifyGet ' @param string $data String representation of base64 encoded JSON object ( required )
// verify the required parameter 'data' is set // query params // for model (json/xml) // for HTTP post (form) // for HTTP post (form)