Sha256: cfe2a1669edcc6523c308c532a0af7ff2096e7b22355598e25f56d9221fcc5af
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 Bytes
Contents
module Tika class Api PUT = Net::HTTP::Put GET = Net::HTTP::Get JSON = "application/json" TEXT = "text/plain" Endpoint = Struct.new(:request_method, :path, :response_format) ENDPOINTS = { get_metadata: Endpoint.new(PUT, "/meta", JSON), get_text: Endpoint.new(PUT, "/tika", TEXT) } def endpoint(name) ENDPOINTS.fetch(name) end def has_endpoint?(name) ENDPOINTS.include?(name) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tika-client-0.1.0 | lib/tika/api.rb |