Class: Tika::Client
Constant Summary
Constants included
from Requests
Requests::GET, Requests::PUT
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(opts = {}) ⇒ Client
Returns a new instance of Client.
22
23
24
25
|
# File 'lib/tika/client.rb', line 22
def initialize(opts={})
@host = opts.fetch(:host, self.class.config.host)
@port = opts.fetch(:port, self.class.config.port)
end
|
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
20
21
22
|
# File 'lib/tika/client.rb', line 20
def host
@host
end
|
#port ⇒ Object
Returns the value of attribute port.
20
21
22
|
# File 'lib/tika/client.rb', line 20
def port
@port
end
|
Class Method Details
.config ⇒ Object
11
12
13
|
# File 'lib/tika/client.rb', line 11
def config
@config ||= Configuration.new
end
|
15
16
17
|
# File 'lib/tika/client.rb', line 15
def configure
yield config
end
|
Instance Method Details
#get_detectors ⇒ Object
51
52
53
|
# File 'lib/tika/client.rb', line 51
def get_detectors
GetDetectorsRequest.execute(connection)
end
|
31
32
33
|
# File 'lib/tika/client.rb', line 31
def get_metadata(opts={})
GetMetadataRequest.execute(connection, opts)
end
|
#get_mime_types ⇒ Object
39
40
41
|
# File 'lib/tika/client.rb', line 39
def get_mime_types
GetMimeTypesRequest.execute(connection)
end
|
#get_parsers ⇒ Object
43
44
45
|
# File 'lib/tika/client.rb', line 43
def get_parsers
GetParsersRequest.execute(connection)
end
|
#get_parsers_details ⇒ Object
47
48
49
|
# File 'lib/tika/client.rb', line 47
def get_parsers_details
GetParsersDetailsRequest.execute(connection)
end
|
#get_text(opts = {}) ⇒ Object
27
28
29
|
# File 'lib/tika/client.rb', line 27
def get_text(opts={})
GetTextRequest.execute(connection, opts)
end
|
#get_version ⇒ Object
35
36
37
|
# File 'lib/tika/client.rb', line 35
def get_version
GetVersionRequest.execute(connection)
end
|