Class: BaiduApis::Helper
- Inherits:
-
Object
- Object
- BaiduApis::Helper
- Defined in:
- lib/baidu_apis/helper.rb
Class Method Summary collapse
- .iplookup ⇒ Object
- .meinv ⇒ Object
- .phone ⇒ Object
- .register_helper(name, config) ⇒ Object
- .stock ⇒ Object
- .weather ⇒ Object
Class Method Details
.iplookup ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/baidu_apis/helper.rb', line 29 def iplookup { method: "get", url: "apistore/iplookupservice/iplookup", param_key: "ip" } end |
.meinv ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/baidu_apis/helper.rb', line 37 def meinv { method: "get", url: "txapi/mvtp/meinv", param_key: "num" } end |
.phone ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/baidu_apis/helper.rb', line 20 def phone { method: "get", url: "apistore/mobilenumber/mobilenumber", param_key: "phone" } end |
.register_helper(name, config) ⇒ Object
45 46 47 48 49 |
# File 'lib/baidu_apis/helper.rb', line 45 def register_helper(name, config) send :define_singleton_method, name do config end end |
.stock ⇒ Object
4 5 6 7 8 9 |
# File 'lib/baidu_apis/helper.rb', line 4 def stock { method: "get", url: "apistore/stockservice/stock" } end |
.weather ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/baidu_apis/helper.rb', line 11 def weather { method: "get", url: "apistore/weatherservice/cityname", param_key: "cityname" } end |