Class: Google::Apis::SolarV1::SolarService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SolarV1::SolarService
- Defined in:
- lib/google/apis/solar_v1/service.rb
Overview
Solar API
Solar API.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://solar.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#find_building_insight_closest(experiments: nil, location_latitude: nil, location_longitude: nil, required_quality: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SolarV1::BuildingInsights
Locates the closest building to a query point.
-
#get_data_layer(exact_quality_required: nil, experiments: nil, location_latitude: nil, location_longitude: nil, pixel_size_meters: nil, radius_meters: nil, required_quality: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SolarV1::DataLayers
Gets solar information for a region surrounding a location.
-
#get_geo_tiff(id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SolarV1::HttpBody
Returns an image by its ID.
-
#initialize ⇒ SolarService
constructor
A new instance of SolarService.
Constructor Details
#initialize ⇒ SolarService
Returns a new instance of SolarService.
47 48 49 50 51 52 |
# File 'lib/google/apis/solar_v1/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-solar_v1', client_version: Google::Apis::SolarV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/solar_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/solar_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#find_building_insight_closest(experiments: nil, location_latitude: nil, location_longitude: nil, required_quality: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SolarV1::BuildingInsights
Locates the closest building to a query point. Returns an error with code
NOT_FOUND
if there are no buildings within approximately 50m of the query
point.
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/google/apis/solar_v1/service.rb', line 84 def find_building_insight_closest(experiments: nil, location_latitude: nil, location_longitude: nil, required_quality: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/buildingInsights:findClosest', ) command.response_representation = Google::Apis::SolarV1::BuildingInsights::Representation command.response_class = Google::Apis::SolarV1::BuildingInsights command.query['experiments'] = experiments unless experiments.nil? command.query['location.latitude'] = location_latitude unless location_latitude.nil? command.query['location.longitude'] = location_longitude unless location_longitude.nil? command.query['requiredQuality'] = required_quality unless required_quality.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_data_layer(exact_quality_required: nil, experiments: nil, location_latitude: nil, location_longitude: nil, pixel_size_meters: nil, radius_meters: nil, required_quality: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SolarV1::DataLayers
Gets solar information for a region surrounding a location. Returns an error
with code NOT_FOUND
if the location is outside the coverage area.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/google/apis/solar_v1/service.rb', line 149 def get_data_layer(exact_quality_required: nil, experiments: nil, location_latitude: nil, location_longitude: nil, pixel_size_meters: nil, radius_meters: nil, required_quality: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/dataLayers:get', ) command.response_representation = Google::Apis::SolarV1::DataLayers::Representation command.response_class = Google::Apis::SolarV1::DataLayers command.query['exactQualityRequired'] = exact_quality_required unless exact_quality_required.nil? command.query['experiments'] = experiments unless experiments.nil? command.query['location.latitude'] = location_latitude unless location_latitude.nil? command.query['location.longitude'] = location_longitude unless location_longitude.nil? command.query['pixelSizeMeters'] = pixel_size_meters unless pixel_size_meters.nil? command.query['radiusMeters'] = radius_meters unless radius_meters.nil? command.query['requiredQuality'] = required_quality unless required_quality.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_geo_tiff(id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SolarV1::HttpBody
Returns an image by its ID.
186 187 188 189 190 191 192 193 194 |
# File 'lib/google/apis/solar_v1/service.rb', line 186 def get_geo_tiff(id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/geoTiff:get', ) command.response_representation = Google::Apis::SolarV1::HttpBody::Representation command.response_class = Google::Apis::SolarV1::HttpBody command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |