Module: Calais
- Defined in:
- lib/calais.rb,
lib/calais/client.rb,
lib/calais/version.rb,
lib/calais/response.rb
Defined Under Namespace
Classes: Client, Error, Response
Constant Summary
collapse
- REST_ENDPOINT =
"http://api.opencalais.com/enlighten/rest/"
- BETA_REST_ENDPOINT =
"http://beta.opencalais.com/enlighten/rest/"
- AVAILABLE_CONTENT_TYPES =
{
:xml => 'text/xml',
:html => 'text/html',
:htmlraw => 'text/htmlraw',
:raw => 'text/raw'
}
- AVAILABLE_OUTPUT_FORMATS =
{
:rdf => 'xml/rdf',
:simple => 'text/simple',
:microformats => 'text/microformats',
:json => 'application/json'
}
- KNOWN_ENABLES =
['GenericRelations', 'SocialTags']
- KNOWN_DISCARDS =
['er/Company', 'er/Geo', 'er/Product']
- MAX_RETRIES =
5
- HTTP_TIMEOUT =
60
- MIN_CONTENT_SIZE =
1
- MAX_CONTENT_SIZE =
100_000
- VERSION =
"0.0.13"
Class Method Summary
collapse
Class Method Details
.enlighten(*args, &block) ⇒ Object
51
|
# File 'lib/calais.rb', line 51
def enlighten(*args, &block); Client.new(*args, &block).enlighten; end
|
.process_document(*args, &block) ⇒ Object
53
54
55
56
57
|
# File 'lib/calais.rb', line 53
def process_document(*args, &block)
client = Client.new(*args, &block)
client.output_format = :rdf
Response.new(client.enlighten)
end
|