A Ruby gem for accessing COEUS API
Add this line to your application's Gemfile:
gem 'coeus'
And then execute:
$ bundle
Or install it yourself as:
$ gem install coeus
# define COEUS base host address
COEUS::COEUS.host 'http://coeus.host'
# define COEUS API key
COEUS::COEUS.key 'api key'
# execute SPARQL query on COEUS host
# returns RDF::Query::Solution array
COEUS::COEUS.query 'SELECT * {?s ?p ?o}'
# get triples from COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns array with binded objects
COEUS::COEUS.triple 'subject', 'predicate', 'object'
# write triples to COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns true if data written
COEUS::COEUS.write 'subject','predicate','object'
# updates triple in COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns true if data updated
COEUS::COEUS.update 'subject','predicate','old object', 'new object'
# delete triple from COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns true if data deleted
COEUS::COEUS.deleted 'subject','predicate','object'