Module: BaiduApi::LbsCloud::V3::RequestBase

Included in:
Geodata::Column, Geodata::Geotable, Geodata::Job, Geodata::Poi, Geosearch
Defined in:
lib/baidu_api/lbs_cloud/v3/request_base.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#akObject

Returns the value of attribute ak.



45
46
47
# File 'lib/baidu_api/lbs_cloud/v3/request_base.rb', line 45

def ak
  @ak
end

#skObject

Returns the value of attribute sk.



45
46
47
# File 'lib/baidu_api/lbs_cloud/v3/request_base.rb', line 45

def sk
  @sk
end

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/baidu_api/lbs_cloud/v3/request_base.rb', line 8

def self.included(base)
  base.send(:include, HTTParty)
  base.send(:extend, ClassMethods)

  base.instance_eval do
    base_uri "http://api.map.baidu.com/"
    format :json
  end
end

Instance Method Details

#initialize(ak, sk = nil) ⇒ Object



47
48
49
# File 'lib/baidu_api/lbs_cloud/v3/request_base.rb', line 47

def initialize(ak, sk = nil)
  @ak, @sk = ak, sk
end