AtomPubClient {atom4R}R Documentation

AtomPubClient class

Description

This class models an AtomPub service client

Format

R6Class object.

Details

AtomPubClient

Value

Object of R6Class for modelling an AtomPub client

Methods

new(url, user, pwd, token, keyring_backend)

This method is to instantiate an AtomPub Client.

The keyring_backend can be set to use a different backend for storing the Atom pub user token with keyring (Default value is 'env').

The logger can be either NULL, "INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)

getUser()

Retrieves user (if any specified).

getPwd()

Retrieves user password (if any user specified).

getToken()

Retrieves user token.

getServiceDocument()

Gets service document description. Unimplemented in abstract classes.

listCollections(pretty)

Lists the available collections. Use pretty to return a "data.frame" insteaf of a list.

getCollectionMembers(collectionId)

List members of a collection. Unimplemented in abstract classes.

Super class

atom4R::atom4RLogger -> AtomPubClient

Public fields

service

service

Methods

Public methods

Inherited methods

Method new()

This method is to instantiate an Sword Client. By default the version is set to "2".

The keyring_backend can be set to use a different backend for storing the SWORD API user token with keyring (Default value is 'env').

The logger allows to specify the level of log (default is NULL), either "INFO" for atom4R logs or "DEBUG" for verbose HTTP client (curl) logs.

Usage
AtomPubClient$new(
  url,
  user = NULL,
  pwd = NULL,
  token = NULL,
  logger = NULL,
  keyring_backend = "env"
)
Arguments
url

url

user

user

pwd

pwd

token

token

logger

logger

keyring_backend

keyring backend. Default is 'env'


Method getUser()

Get user

Usage
AtomPubClient$getUser()
Returns

object of class character


Method getPwd()

Get password

Usage
AtomPubClient$getPwd()
Returns

object of class character


Method getToken()

Get token

Usage
AtomPubClient$getToken()
Returns

object of class character


Method getServiceDocument()

Get service document

Usage
AtomPubClient$getServiceDocument()
Arguments
force

force Force getting/refreshing of service document

Returns

object of class SwordServiceDocument


Method listCollections()

List collections

Usage
AtomPubClient$listCollections(pretty = FALSE)
Arguments
pretty

pretty

Returns

a list of collections, or data.frame


Method getCollectionMembers()

Get collection members. Unimplemented abstract method at AtomPubClient level

Usage
AtomPubClient$getCollectionMembers()

Method clone()

The objects of this class are cloneable with this method.

Usage
AtomPubClient$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Note

Abstract class used internally for AtomPub (Atom Publishing Protocol) clients

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>


[Package atom4R version 0.3-3 Index]