Class: TokyoMetro::Factory::Get::Api::DataSearch::PassengerSurvey
- Inherits:
-
MetaClass::Search::DataSearch
- Object
- MetaClass::Fundamental
- MetaClass::Search
- MetaClass::Search::DataSearch
- TokyoMetro::Factory::Get::Api::DataSearch::PassengerSurvey
- Includes:
- ClassNameLibrary::Api::PassengerSurvey
- Defined in:
- lib/tokyo_metro/factory/get/api/data_search/passenger_survey.rb
Overview
API から駅乗降人員数 odpt:PassengerSurvey のデータを取得するための Factory Pattern のクラス
Class Method Summary collapse
-
.process(http_client, id, same_as, operator, survey_year, parse_json, generate_instance, to_inspect) ⇒ Object
API からデータを取得するメソッド.
Instance Method Summary collapse
-
#initialize(id, same_as, operator, survey_year, parse_json, generate_instance, to_inspect) ⇒ PassengerSurvey
constructor
Constructor.
-
#parameters ⇒ Hash
HTTPClient に送るパラメーター.
Methods inherited from MetaClass::Fundamental
Constructor Details
#initialize(id, same_as, operator, survey_year, parse_json, generate_instance, to_inspect) ⇒ PassengerSurvey
Constructor
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tokyo_metro/factory/get/api/data_search/passenger_survey.rb', line 7 def initialize( id , same_as , operator , survey_year , parse_json , generate_instance , to_inspect ) super( parse_json , generate_instance , to_inspect ) @id = id @same_as = same_as @operator = operator @survey_year = survey_year end |
Class Method Details
.process(http_client, id, same_as, operator, survey_year, parse_json, generate_instance, to_inspect) ⇒ Object
API からデータを取得するメソッド
34 35 36 37 38 39 40 41 |
# File 'lib/tokyo_metro/factory/get/api/data_search/passenger_survey.rb', line 34 def self.process( http_client , id , same_as , operator , survey_year , parse_json , generate_instance , to_inspect ) info = self.new( id , same_as , operator , survey_year , parse_json , generate_instance , to_inspect ) info.get_data( http_client ) end |
Instance Method Details
#parameters ⇒ Hash
HTTPClient に送るパラメーター
20 21 22 23 24 25 26 27 |
# File 'lib/tokyo_metro/factory/get/api/data_search/passenger_survey.rb', line 20 def parameters h = super set_parameter_send_to_api( h , "\@id" , @id , String ) set_parameter_send_to_api( h , "owl:sameAs" , @same_as , String ) set_parameter_send_to_api( h , "odpt:operator" , @operator , String ) set_parameter_send_to_api( h , "odpt:surveyYear" , @survey_year , Integer ) h end |