Sha256: ec1c440d9e67c88556a51e818db8c337c02f67ea03dbf737e871f94e747501f1

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 Bytes

Contents

require "httparty"

module HTTPService
  class NaviAI

    def self.start(filepath:, client_id: nil, client_type:, token:)
      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 }.to_json)
    end

    def self.generate_csv(email)
      HTTParty.post("https://api2.navihq.com/generate_csv_input?email=#{email}")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
navi_client-1.3.3 lib/http_service/naviai.rb
navi_client-1.3.1 lib/http_service/naviai.rb