Class: HTTPService::NaviAI
- Inherits:
-
Object
- Object
- HTTPService::NaviAI
- Defined in:
- lib/http_service/naviai.rb
Class Method Summary collapse
- .generate_csv(email) ⇒ Object
- .start(filepath:, client_id: nil, client_type:, token:, email:) ⇒ Object
Class Method Details
.generate_csv(email) ⇒ Object
14 15 16 |
# File 'lib/http_service/naviai.rb', line 14 def self.generate_csv(email) HTTParty.post("https://api2.navihq.com/generate_csv_input?email=#{email}") end |
.start(filepath:, client_id: nil, client_type:, token:, email:) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/http_service/naviai.rb', line 6 def self.start(filepath:, client_id: nil, client_type:, token:, email:) go_url = 'http://localhost:9090/v2/metas' if client_type == 'cloud' go_url = 'http://34.214.134.104:9090/v2/metas' end HTTParty.post(go_url, body: { client_id: client_id, client_type: client_type, list_meta_path: filepath, token: token, email: email }.to_json) end |