public function getSingle()
    {
        // Set the endpoint
        $endpoint = $this->buildEndpoint();

        // Set the header
        $this->buildHttpHeader();

        // Send the request
        $client = new Client(); //GuzzleHttp\Client

        try {
            $response = $client->request('GET', $endpoint, [
                'headers' => $this->headers,
                'query' => ['$select' => $this->select,
                    'id' => $this->recordID,
                ],
                'curl' => $this->setGetCurlopts(),
            ]);

        } catch (\GuzzleException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\ClientException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\RequestException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\ServerException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        }

        return json_decode($response->getBody(), true);
    }
public function getSingle()
    {
        // Set the endpoint
        $endpoint = $this->buildEndpoint();

        // Set the header
        $this->buildHttpHeader();

        // Send the request
        $client = new Client(); //GuzzleHttp\Client

        try {
            $response = $client->request('GET', $endpoint, [
                'headers' => $this->headers,
                'query' => ['$select' => $this->select,
                    'id' => $this->recordID,
                ],
                'curl' => $this->setGetCurlopts(),
            ]);

        } catch (\GuzzleException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\ClientException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\RequestException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\ServerException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        }

        return json_decode($response->getBody(), true);
    }
public function getSingle ( ) { // Set the endpoint $ endpoint = $ this -> buildEndpoint ( ) ; // Set the header $ this -> buildHttpHeader ( ) ; // Send the request $ client = new Client ( ) ; //GuzzleHttp\Client try { $ response = $ client -> request ( 'GET' , $ endpoint , [ 'headers' => $ this -> headers , 'query' => [ '$select' => $ this -> select , 'id' => $ this -> recordID , ] , 'curl' => $ this -> setGetCurlopts ( ) , ] ) ; } catch ( \ GuzzleException $ e ) { $ this -> errorMessage = $ e -> getResponse ( ) -> getBody ( ) -> getContents ( ) ; return false ; } catch ( \ GuzzleHttp \ Exception \ ClientException $ e ) { $ this -> errorMessage = $ e -> getResponse ( ) -> getBody ( ) -> getContents ( ) ; return false ; } catch ( \ GuzzleHttp \ Exception \ RequestException $ e ) { $ this -> errorMessage = $ e -> getResponse ( ) -> getBody ( ) -> getContents ( ) ; return false ; } catch ( \ GuzzleHttp \ Exception \ ServerException $ e ) { $ this -> errorMessage = $ e -> getResponse ( ) -> getBody ( ) -> getContents ( ) ; return false ; } return json_decode ( $ response -> getBody ( ) , true ) ; }
Get a single record from a defined table
Get a single record from a defined table