Class: Cdss::Client
- Inherits:
-
Object
- Object
- Cdss::Client
- Includes:
- AdminCalls, Analysis, Climate, GroundWater, ReferenceTables, Structures, SurfaceWater, Telemetry, WaterRights, HTTParty
- Defined in:
- lib/cdss/client.rb
Overview
Main client class for interacting with the CDSS API.
The Client class provides access to all CDSS API endpoints and handles authentication, request configuration, and response processing.
Constant Summary
Constants included from ReferenceTables
Instance Attribute Summary collapse
-
#api_key ⇒ String?
API key for authentication.
-
#options ⇒ Hash
readonly
Additional options passed to the client.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Client
constructor
Initialize a new CDSS API client.
Methods included from ReferenceTables
Methods included from Utils
#batch_dates, #build_query, #fetch_paginated_data, #format_date, #format_query_param, #parse_timestamp, #safe_float, #safe_integer
Methods included from WaterRights
#get_water_rights_net_amounts, #get_water_rights_transactions
Methods included from Telemetry
#get_telemetry_stations, #get_telemetry_ts
Methods included from SurfaceWater
Methods included from Structures
#get_diversion_records_ts, #get_stage_volume_ts, #get_structures, #get_water_classes
Methods included from GroundWater
#get_geophysical_log_picks, #get_geophysical_log_wells, #get_water_level_wells, #get_well_measurements
Methods included from Climate
#get_climate_frost_dates, #get_climate_stations, #get_climate_ts, #get_climate_ts_day, #get_climate_ts_month
Methods included from Analysis
#get_call_analysis_gnisid, #get_call_analysis_wdid, #get_source_route_analysis, #get_source_route_framework
Methods included from AdminCalls
Constructor Details
#initialize(api_key: nil, **options) ⇒ Client
Initialize a new CDSS API client.
37 38 39 40 41 |
# File 'lib/cdss/client.rb', line 37 def initialize(api_key: nil, **) @options = @api_key = api_key setup_client end |
Instance Attribute Details
#api_key ⇒ String?
Returns API key for authentication.
30 31 32 |
# File 'lib/cdss/client.rb', line 30 def api_key @api_key end |
#options ⇒ Hash (readonly)
Returns Additional options passed to the client.
27 28 29 |
# File 'lib/cdss/client.rb', line 27 def @options end |