Class: Mocodo::Contents
- Inherits:
-
WebCuration
- Object
- WebCuration
- Mocodo::Contents
- Defined in:
- lib/mocodo/web_curation.rb
Instance Method Summary collapse
Methods inherited from WebCuration
Constructor Details
This class inherits a constructor from Mocodo::WebCuration
Instance Method Details
#get_contents(conf = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/mocodo/web_curation.rb', line 34 def get_contents(conf = {}) uri = URI.parse("https://api.apigw.smt.docomo.ne.jp/webCuration/v3/contents?APIKEY=#{@client.get_api_key}#{build_url(conf)}") http = Net::HTTP.new('api.apigw.smt.docomo.ne.jp', 443) http.use_ssl = true request = Net::HTTP::Get.new(uri.request_uri) response = nil http.start do |h| response = JSON.parse(h.request(request).body, symbolize_names: true) end return response end |