Sha256: 4e219c73f5457a8d87cd5c7456c825858ac2df4bf976c9819802ead80cb3d39f
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
require_relative "RequestBase" class ImagesRequest < RequestBase CONNECT_ROUTE = "/v3/images" # mashery endpoint QUERY_PARAMS_NAMES = ["page","page_size"] QUERY_PARAMS_NAMES.each do |key| define_method :"with_#{key}" do |value = true| if value.is_a?(Array) build_query_params(key, value.join(",")) else build_query_params(key, value) end return self end end public def with_ids(ids) @ids = ids.join("%2C") return self end public def execute return @http_helper.get("#{CONNECT_ROUTE}/#{@ids}", @query_params) return "here" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ConnectSDK-1.0.2.Beta | lib/ImagesRequest.rb |
ConnectSDK-1.0.1.Beta | lib/ImagesRequest.rb |