diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-02-23 17:56:46 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-02-23 17:56:46 +0000 |
commit | fa9069e13fb6b1c8bb4ebcdf82f1cf1c04ad71ca (patch) | |
tree | efe8bff6c3538c856805cadac832531aa6b0821e /lib/compound.rb | |
parent | b651c4d199a7b4d6a06cdefb281601bddd2fc885 (diff) |
(partially) switched back to RestClientWrapper
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index 8761d50..ce0fdbf 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -11,21 +11,21 @@ module OpenTox # @param [String] smiles Smiles string # @return [OpenTox::Compound] Compound def self.from_smiles service_uri, smiles, subjectid=nil - Compound.new RestClient.post(service_uri, smiles, {:content_type => 'chemical/x-daylight-smiles', :subjectid => subjectid}) + Compound.new RestClientWrapper.post(service_uri, smiles, {:content_type => 'chemical/x-daylight-smiles', :subjectid => subjectid}) end # Create a compound from inchi string # @param [String] smiles InChI string # @return [OpenTox::Compound] Compound def self.from_inchi service_uri, inchi, subjectid=nil - Compound.new RestClient.post(service_uri, inchi, {:content_type => 'chemical/x-inchi', :subjectid => subjectid}) + Compound.new RestClientWrapper.post(service_uri, inchi, {:content_type => 'chemical/x-inchi', :subjectid => subjectid}) end # Create a compound from sdf string # @param [String] smiles SDF string # @return [OpenTox::Compound] Compound def self.from_sdf service_uri, sdf, subjectid=nil - Compound.new RestClient.post(service_uri, sdf, {:content_type => 'chemical/x-mdl-sdfile', :subjectid => subjectid}) + Compound.new RestClientWrapper.post(service_uri, sdf, {:content_type => 'chemical/x-mdl-sdfile', :subjectid => subjectid}) end # Create a compound from name. Relies on an external service for name lookups. @@ -34,7 +34,7 @@ module OpenTox # @param [String] name name can be also an InChI/InChiKey, CAS number, etc # @return [OpenTox::Compound] Compound def self.from_name service_uri, name, subjectid=nil - Compound.new RestClient.post(service_uri, name, {:content_type => 'text/plain', :subjectid => subjectid}) + Compound.new RestClientWrapper.post(service_uri, name, {:content_type => 'text/plain', :subjectid => subjectid}) end # Get InChI |