Class: SoilSidekick::ConsumerPlantCareApi
- Inherits:
-
Object
- Object
- SoilSidekick::ConsumerPlantCareApi
- Defined in:
- lib/soilsidekick/api/consumer_plant_care_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#beginner_guidance(beginner_guidance_request, opts = {}) ⇒ BeginnerGuidance
Beginner-friendly plant guidance without jargon Judgment-free, accessible plant guidance that solves community gatekeeping issues.
-
#beginner_guidance_with_http_info(beginner_guidance_request, opts = {}) ⇒ Array<(BeginnerGuidance, Integer, Hash)>
Beginner-friendly plant guidance without jargon Judgment-free, accessible plant guidance that solves community gatekeeping issues.
-
#dynamic_care(dynamic_care_request, opts = {}) ⇒ DynamicCare
Hyper-localized dynamic plant care recommendations Real-time, environment-aware care recommendations that solve the "generic advice" problem.
-
#dynamic_care_with_http_info(dynamic_care_request, opts = {}) ⇒ Array<(DynamicCare, Integer, Hash)>
Hyper-localized dynamic plant care recommendations Real-time, environment-aware care recommendations that solve the "generic advice" problem.
-
#initialize(api_client = ApiClient.default) ⇒ ConsumerPlantCareApi
constructor
A new instance of ConsumerPlantCareApi.
-
#safe_identification(safe_identification_request, opts = {}) ⇒ SafeIdentification
Safe plant identification with toxic lookalike warnings Environmentally-contextualized plant identification that addresses misidentification concerns.
-
#safe_identification_with_http_info(safe_identification_request, opts = {}) ⇒ Array<(SafeIdentification, Integer, Hash)>
Safe plant identification with toxic lookalike warnings Environmentally-contextualized plant identification that addresses misidentification concerns.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ConsumerPlantCareApi
Returns a new instance of ConsumerPlantCareApi.
19 20 21 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#beginner_guidance(beginner_guidance_request, opts = {}) ⇒ BeginnerGuidance
Beginner-friendly plant guidance without jargon Judgment-free, accessible plant guidance that solves community gatekeeping issues. This endpoint: - Translates scientific jargon into plain language - Never makes users feel stupid for asking about common plants - Uses progressive disclosure (simple answer first, details on request) - Provides encouraging, supportive tone - Offers practical "what do I do right now" guidance
30 31 32 33 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 30 def beginner_guidance(beginner_guidance_request, opts = {}) data, _status_code, _headers = beginner_guidance_with_http_info(beginner_guidance_request, opts) data end |
#beginner_guidance_with_http_info(beginner_guidance_request, opts = {}) ⇒ Array<(BeginnerGuidance, Integer, Hash)>
Beginner-friendly plant guidance without jargon Judgment-free, accessible plant guidance that solves community gatekeeping issues. This endpoint: - Translates scientific jargon into plain language - Never makes users feel stupid for asking about common plants - Uses progressive disclosure (simple answer first, details on request) - Provides encouraging, supportive tone - Offers practical "what do I do right now" guidance
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 43 def beginner_guidance_with_http_info(beginner_guidance_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsumerPlantCareApi.beginner_guidance ...' end # verify the required parameter 'beginner_guidance_request' is set if @api_client.config.client_side_validation && beginner_guidance_request.nil? fail ArgumentError, "Missing the required parameter 'beginner_guidance_request' when calling ConsumerPlantCareApi.beginner_guidance" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/beginner-guidance' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(beginner_guidance_request) # return_type return_type = opts[:debug_return_type] || 'BeginnerGuidance' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ConsumerPlantCareApi.beginner_guidance", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsumerPlantCareApi#beginner_guidance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#dynamic_care(dynamic_care_request, opts = {}) ⇒ DynamicCare
Hyper-localized dynamic plant care recommendations Real-time, environment-aware care recommendations that solve the "generic advice" problem. Unlike static "water every 7 days" recommendations, this endpoint: - Adjusts watering based on current humidity, temperature, and recent rainfall - Considers container type, soil composition, and drainage - Factors in seasonal changes and indoor environment conditions - Accounts for plant maturity and growth phase - Provides actionable guidance, not rigid schedules
119 120 121 122 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 119 def dynamic_care(dynamic_care_request, opts = {}) data, _status_code, _headers = dynamic_care_with_http_info(dynamic_care_request, opts) data end |
#dynamic_care_with_http_info(dynamic_care_request, opts = {}) ⇒ Array<(DynamicCare, Integer, Hash)>
Hyper-localized dynamic plant care recommendations Real-time, environment-aware care recommendations that solve the "generic advice" problem. Unlike static "water every 7 days" recommendations, this endpoint: - Adjusts watering based on current humidity, temperature, and recent rainfall - Considers container type, soil composition, and drainage - Factors in seasonal changes and indoor environment conditions - Accounts for plant maturity and growth phase - Provides actionable guidance, not rigid schedules
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 132 def dynamic_care_with_http_info(dynamic_care_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsumerPlantCareApi.dynamic_care ...' end # verify the required parameter 'dynamic_care_request' is set if @api_client.config.client_side_validation && dynamic_care_request.nil? fail ArgumentError, "Missing the required parameter 'dynamic_care_request' when calling ConsumerPlantCareApi.dynamic_care" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/dynamic-care' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(dynamic_care_request) # return_type return_type = opts[:debug_return_type] || 'DynamicCare' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ConsumerPlantCareApi.dynamic_care", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsumerPlantCareApi#dynamic_care\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#safe_identification(safe_identification_request, opts = {}) ⇒ SafeIdentification
Safe plant identification with toxic lookalike warnings Environmentally-contextualized plant identification that addresses misidentification concerns. Unlike generic plant ID, this endpoint: - Checks against a toxic lookalike database with visual similarity scores - Uses environmental context (soil, climate, regional flora) to weight identification probability - Provides confidence breakdowns showing why alternatives were considered - Issues explicit warnings for dangerous lookalikes (Poison Hemlock vs Wild Carrot) - Accounts for plant growth stage (seedling identification challenges)
208 209 210 211 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 208 def safe_identification(safe_identification_request, opts = {}) data, _status_code, _headers = safe_identification_with_http_info(safe_identification_request, opts) data end |
#safe_identification_with_http_info(safe_identification_request, opts = {}) ⇒ Array<(SafeIdentification, Integer, Hash)>
Safe plant identification with toxic lookalike warnings Environmentally-contextualized plant identification that addresses misidentification concerns. Unlike generic plant ID, this endpoint: - Checks against a toxic lookalike database with visual similarity scores - Uses environmental context (soil, climate, regional flora) to weight identification probability - Provides confidence breakdowns showing why alternatives were considered - Issues explicit warnings for dangerous lookalikes (Poison Hemlock vs Wild Carrot) - Accounts for plant growth stage (seedling identification challenges)
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/soilsidekick/api/consumer_plant_care_api.rb', line 221 def safe_identification_with_http_info(safe_identification_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConsumerPlantCareApi.safe_identification ...' end # verify the required parameter 'safe_identification_request' is set if @api_client.config.client_side_validation && safe_identification_request.nil? fail ArgumentError, "Missing the required parameter 'safe_identification_request' when calling ConsumerPlantCareApi.safe_identification" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/safe-identification' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(safe_identification_request) # return_type return_type = opts[:debug_return_type] || 'SafeIdentification' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ConsumerPlantCareApi.safe_identification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConsumerPlantCareApi#safe_identification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |