Connection: Connection

ConnectionR Documentation

Connection

Description

Connection object, storing HttpClient connection and allowing access to endpoint instances, e.g. templates, phenotypes

Value

TRUE if authenticated, FALSE otherwise

List containing user inputted username and password

Public fields

HttpClient

(crul::HttpClient) Connection object

Active bindings

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

Methods

Public methods


Method new()

Create a connection to the ConceptLibrary

Usage
Connection$new(
  username = NA,
  password = NA,
  public = FALSE,
  url = DEFAULT_CONNECTION_URL
)
Arguments
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


Method clone()

The objects of this class are cloneable with this method.

Usage
Connection$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

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


SwanseaUniversityMedical/ConceptLibraryClient documentation built on April 14, 2025, 12:45 p.m.