BiodbUrl {biodb}R Documentation

Class URL.

Description

Class URL.

Class URL.

Details

This class represents a URL object that can be used in requests.

Methods

Public methods


Method new()

Constructor.

Usage
BiodbUrl$new(url = character(), params = character())
Arguments
url

The URL to access, as a character vector.

params

The list of parameters to append to this URL.

Returns

A new instance.


Method getDomain()

Gets the domain.

Usage
BiodbUrl$getDomain()
Returns

None.


Method setUrl()

Sets the base URL string.

Usage
BiodbUrl$setUrl(url)
Arguments
url

The base URL string.

Returns

None.


Method setParam()

Sets a parameter.

Usage
BiodbUrl$setParam(key, value)
Arguments
key

The parameter name.

value

The value of the parameter.

Returns

None.


Method print()

Displays information about this instance.

Usage
BiodbUrl$print()
Returns

None.


Method toString()

Gets the URL as a string representation.

Usage
BiodbUrl$toString(encode = TRUE)
Arguments
encode

If set to TRUE, then encodes the URL.

Returns

The URL as a string, with all parameters and values set.


Method clone()

The objects of this class are cloneable with this method.

Usage
BiodbUrl$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

BiodbRequestScheduler, BiodbRequest.

Examples

# Create a URL object
u <- c("https://www.uniprot.org", "uniprot")
p <- c(query="reviewed:yes+AND+organism:9606",
       columns='id,entry name,protein names',
       format="tab")
url <- BiodbUrl$new(url=u, params=p)
url$toString()


[Package biodb version 1.0.4 Index]