Connection | R Documentation |
Connection object, storing HttpClient connection and allowing access to endpoint instances, e.g. templates, phenotypes
TRUE if authenticated, FALSE otherwise
List containing user inputted username and password
HttpClient
(crul::HttpClient) Connection object
HttpClient
(crul::HttpClient) Connection object
templates
(ConceptLibraryClient::Templates) Templates instance
phenotypes
(ConceptLibraryClient::Phenotypes) Phenotypes instance
concepts
(ConceptLibraryClient::Concepts) Concepts instance
collections
(ConceptLibraryClient::Collections) Collections instance
tags
(ConceptLibraryClient::Tags) Tags instance
datasources
(ConceptLibraryClient::Datasources) Datasources instance
ontology
(ConceptLibraryClient::Ontology) Ontology instance
new()
Create a connection to the ConceptLibrary
Connection$new( username = NA, password = NA, public = FALSE, url = DEFAULT_CONNECTION_URL )
username
(string) Username for authentication
password
(string) Password for authentication
public
(bool) Flag to determine whether login is required
url
(string) URL used when connecting to the ConceptLibrary
clone()
The objects of this class are cloneable with this method.
Connection$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Authenticated login, with url set to HDRUK
client = ConceptLibraryClient::Connection$new(
url=ConceptLibraryClient::DOMAINS$HDRUK
)
# Authenticated login, with custom URL
client = ConceptLibraryClient::Connection$new(
url='custom-url.com/'
)
# Non-authenticated connection
client = ConceptLibraryClient::Connection$new(public=FALSE)
# Accessing phenotypes
phenotype_detail = client$phenotypes$get('PH1', version_id=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.