Sha256: 159a1581b4246fa2047fb6a444fd96bd8599097de727267c768f7d41600bab24

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

require "httparty"

module HTTPService
  class NaviAI

    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, timeout: 400)
    end

    def self.generate_csv(url, token)
      HTTParty.post(url, headers: {"Authorization": token})
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
navi_client-1.4.3 lib/http_service/naviai.rb
navi_client-1.4.2 lib/http_service/naviai.rb
navi_client-1.4.1 lib/http_service/naviai.rb
navi_client-1.4.0 lib/http_service/naviai.rb
navi_client-1.3.11 lib/http_service/naviai.rb