private function getResult($function, $args = [], $post = false )
    {
        $qargs = ($post ? '' : '?') . http_build_query( $args );

        $curl = curl_init( $this->spiget.$function.( !$post ? ( sizeof( $args ) > 0 ? $qargs : '' ) : '' ) );

        curl_setopt($curl, CURLOPT_USERAGENT, $this->userargent);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

        if ($post) curl_setopt($curl,CURLOPT_POST, 1);
        if ($post) curl_setopt($curl, CURLOPT_POSTFIELDS, $qargs);

        $result = curl_exec($curl);
        $http_response = curl_getinfo($curl)['http_code'];

        curl_close($curl);

        if ( $http_response == 200 )
        {
            return json_decode( $result, true );
        }
        elseif ( $this->throwExceptions )
        {
            throw new SpigetException( json_decode( $result, true )['error'], $http_response );
        }
        else
        {
            return null;
        }
    }