Skip to content

bioinformatics-ua/coeus-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COEUS gem

A Ruby gem for accessing COEUS API

Installation

Add this line to your application's Gemfile:

gem 'coeus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coeus

Usage

# 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'

Releases

No releases published

Packages

No packages published

Languages