Class: Sink::Resources::ComplexQueries

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/complex_queries.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ComplexQueries

Returns a new instance of ComplexQueries.

Parameters:



7
8
9
# File 'lib/sink/resources/complex_queries.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#array_query(params = {}, opts = {}) ⇒ Sink::Models::ComplexQueryArrayQueryResponse

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [Array<Symbol, Include>, nil] :include

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



17
18
19
20
21
22
23
24
25
# File 'lib/sink/resources/complex_queries.rb', line 17

def array_query(params = {}, opts = {})
  req = {
    method: :get,
    path: "/array_query",
    query: params,
    model: Sink::Models::ComplexQueryArrayQueryResponse
  }
  @client.request(req, opts)
end

#object_query(params = {}, opts = {}) ⇒ Hash

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [Hash, nil] :include

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:

  • (Hash)


33
34
35
36
37
38
39
40
41
# File 'lib/sink/resources/complex_queries.rb', line 33

def object_query(params = {}, opts = {})
  req = {
    method: :get,
    path: "/object_query",
    query: params,
    model: Hash
  }
  @client.request(req, opts)
end

#union_query(params = {}, opts = {}) ⇒ Hash

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [Array<String>, Float, String, nil] :include

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:

  • (Hash)


49
50
51
52
53
54
55
56
57
# File 'lib/sink/resources/complex_queries.rb', line 49

def union_query(params = {}, opts = {})
  req = {
    method: :get,
    path: "/union_query",
    query: params,
    model: Hash
  }
  @client.request(req, opts)
end