CRUD method: GET


 @return [Object]

 @see Crapi::Client#get Crapi::Client#get
423158
def get(path, headers: {}, query: {})
      @parent.get("/#{@segment}/#{path}".gsub(%r{/+}, '/'),
                  headers: @default_headers.merge(headers), query: query)
    end
396235
def get(path, &block)
      path = @uri.merge(path).path
      body = @handler.request_returning_body(:get, path, @headers, &block)
      body
    end
1079311
def get(*args)
      params = arguments(args).params

      if user_name = params.delete('user')
        get_request("/users/#{user_name}", params)
      else
        get_request("/user", params)
      end
    end
1077765
@Override
  public I get()
  {
    I instance = _instance;
    
    if (instance == null || instance.isModified()) {
      _instance = instance = service().get();
    }
    
    return instance;
  }
978770
public function fetch()
    {
        $sessionToken = null;
        if (AVUser::getCurrentUser())
        {
            $sessionToken = AVUser::getCurrentUser()->getSessionToken();
        }
        $response = AVClient::_request('GET', '/classes/' . $this->className . '/' . $this->objectId, $sessionToken);
        $this->_mergeAfterFetch($response);
    }
441192
def get(pattern, opts={})
      path = build_url(pattern, opts)
      request(:get, path, opts)
    end
351652
public static function get() {
        if ($data = @file_get_contents("https://raw.github.com/tobie/ua-parser/master/regexes.yaml")) {
            if (file_exists(__DIR__."/resources/regexes.yaml")) {
                if (!self::$nobackup) { 
                    if (!self::$silent) { print("backing up old YAML file...\n"); }
                        if (!copy(__DIR__."/resources/regexes.yaml", __DIR__."/resources/regexes.".date("Ymdhis").".yaml")) {
                            if (!self::$silent) { print("back-up failed...\n"); }
                                exit;
                        }
                }
            }
            $fp = fopen(__DIR__."/resources/regexes.yaml", "w");
            fwrite($fp, $data);
            fclose($fp);
            if (!self::$silent) { print("success...\n"); }
        } else {
            if (!self::$silent) { print("failed to get the file...\n"); }
        }
    }
1357606
def get_request(hash=true)
        resp = RestClient.get get_url
        hash ? Hash.from_xml(resp).it_keys_to_sym : resp
      end
410977
def get(url, options = {})
      connection(url, options) do |uri, conn|
        conn.get(uri.request_uri, options)
      end
    end
24072
def get(type, id)
    info = json_get(@target, "#{type_info(type, :path)}/#{URI.encode(id)}",
        @key_style, headers)

    fake_client_id(info) if type == :client # hide client reply, not quite scim
    info
  end
1105178
def fetch(resource, params = {})
      method = :get
      page = 1

      params[:page] = page
      partial = request(resource, method, params)
      while partial.is_a?(Array) && !partial.empty?
        results ||= []
        results += partial
        page += 1
        params[:page] = page
        partial = request(resource, method, params)
      end

      results = partial unless partial.nil? || partial.empty?
      results
    end
1062502
def get(self, multihash, **kwargs):
        
        args = (multihash,)
        return self._client.download('/get', args, **kwargs)
1199001
def get(path, options={}, raw=false, faraday_options={})
      request(:get, path, options, raw, faraday_options)
    end
427237
protected function _get()
	{
		$id_path = $this->identifier_to_path( $this->identifier );
		$file = static::$path.$id_path.'.cache';
		if ( ! is_file($file) or ($size = filesize($file)) == 0)
		{
			return false;
		}

		$handle = fopen($file, 'r');
		if ( ! $handle)
		{
			return false;
		}

		// wait for a lock
		while( ! flock($handle, LOCK_SH));

		// read the session data
		$payload = fread($handle, $size);

		//release the lock
		flock($handle, LOCK_UN);

		// close the file
		fclose($handle);

		try
		{
			$this->unprep_contents($payload);
		}
		catch (\UnexpectedValueException $e)
		{
			return false;
		}

		return true;
	}
414267
def get_resource(url, resource_class, params={})
      resource_class.from_hash(get(url, params), client: self)
    end
757915
def get_resources(url, resource_class, params={})
      get(url, params).map do |result|
        resource_class.from_hash(result, client: self)
      end
    end
822541
def get(path, params = nil, headers = {})
      response = http_client.get(request_uri(path), params, request_headers(headers))
      if response.status == 200
        parse_response(response)
      else
        handle_error_response(response)
      end
    end