Module: Patentscope
- Defined in:
- lib/patentscope.rb,
lib/patentscope/client.rb,
lib/patentscope/version.rb,
lib/patentscope/webservice.rb,
lib/patentscope/configuration.rb,
lib/patentscope/pct_doc_number.rb,
lib/patentscope/webservice_soap_builder.rb,
lib/patentscope/webservice_soap_stripper.rb
Defined Under Namespace
Classes: BusinessError, Client, Configuration, NoCredentialsError, PctAppNumber, PctPubNumber, Webservice, WebserviceSoapBuilder, WebserviceSoapStripper, WrongCredentialsError, WrongNumberFormatError
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
4
5
6
|
# File 'lib/patentscope/configuration.rb', line 4
def configuration
@configuration
end
|
Class Method Details
6
7
8
9
|
# File 'lib/patentscope/configuration.rb', line 6
def configure
self.configuration ||= Configuration.new
yield(configuration) if block_given?
end
|
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/patentscope/configuration.rb', line 11
def configure_from_env
if self.configuration
return false
else
self.configuration = Configuration.new
self.configuration.username = ENV['PATENTSCOPE_WEBSERVICE_USERNAME']
self.configuration.password = ENV['PATENTSCOPE_WEBSERVICE_PASSWORD']
return true
end
end
|
22
23
24
|
# File 'lib/patentscope/configuration.rb', line 22
def configured?
(configuration && configuration.username && configuration.password)? true : false
end
|
.get_available_documents(ia_number) ⇒ Object
22
23
24
|
# File 'lib/patentscope.rb', line 22
def get_available_documents(ia_number)
webservice.get_available_documents(ia_number: ia_number)
end
|
.get_document_content(doc_id) ⇒ Object
26
27
28
|
# File 'lib/patentscope.rb', line 26
def get_document_content(doc_id)
webservice.get_document_content(doc_id: doc_id)
end
|
.get_document_content_page(doc_id, page_id) ⇒ Object
42
43
44
|
# File 'lib/patentscope.rb', line 42
def get_document_content_page(doc_id, page_id)
webservice.get_document_content_page(doc_id: doc_id, page_id: page_id)
end
|
.get_document_ocr_content(doc_id) ⇒ Object
30
31
32
|
# File 'lib/patentscope.rb', line 30
def get_document_ocr_content(doc_id)
webservice.get_document_ocr_content(doc_id: doc_id)
end
|
.get_document_table_of_contents(doc_id) ⇒ Object
38
39
40
|
# File 'lib/patentscope.rb', line 38
def get_document_table_of_contents(doc_id)
webservice.get_document_table_of_contents(doc_id: doc_id)
end
|
.get_iasr(ia_number) ⇒ Object
34
35
36
|
# File 'lib/patentscope.rb', line 34
def get_iasr(ia_number)
webservice.get_iasr(ia_number: ia_number)
end
|
.reset_configuration ⇒ Object
26
27
28
|
# File 'lib/patentscope/configuration.rb', line 26
def reset_configuration
self.configuration = nil
end
|
.wsdl ⇒ Object
18
19
20
|
# File 'lib/patentscope.rb', line 18
def wsdl
webservice.wsdl
end
|