# GraphSense API
#
# GraphSense API provides programmatic access to various ledgers' addresses, entities, blocks, transactions and tags for automated and highly efficient forensics tasks.
#
# The version of the OpenAPI document: 1.0.1
# Contact: contact@ikna.io
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title EntityAddresses
#'
#' @description EntityAddresses Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field addresses list( \link{Address} )
#'
#' @field next_page character [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
EntityAddresses <- R6::R6Class(
'EntityAddresses',
public = list(
`addresses` = NULL,
`next_page` = NULL,
initialize = function(
`addresses`, `next_page`=NULL, ...
) {
local.optional.var <- list(...)
if (!missing(`addresses`)) {
stopifnot(is.vector(`addresses`), length(`addresses`) != 0)
sapply(`addresses`, function(x) stopifnot(R6::is.R6(x)))
self$`addresses` <- `addresses`
}
if (!is.null(`next_page`)) {
stopifnot(is.character(`next_page`), length(`next_page`) == 1)
self$`next_page` <- `next_page`
}
},
toJSON = function() {
EntityAddressesObject <- list()
if (!is.null(self$`addresses`)) {
EntityAddressesObject[['addresses']] <-
lapply(self$`addresses`, function(x) x$toJSON())
}
if (!is.null(self$`next_page`)) {
EntityAddressesObject[['next_page']] <-
self$`next_page`
}
EntityAddressesObject
},
fromJSON = function(EntityAddressesJson) {
EntityAddressesObject <- jsonlite::fromJSON(EntityAddressesJson)
if (!is.null(EntityAddressesObject$`addresses`)) {
self$`addresses` <- ApiClient$new()$deserializeObj(EntityAddressesObject$`addresses`, "array[Address]", loadNamespace("graphsense"))
}
if (!is.null(EntityAddressesObject$`next_page`)) {
self$`next_page` <- EntityAddressesObject$`next_page`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`addresses`)) {
sprintf(
'"addresses":
[%s]
',
paste(sapply(self$`addresses`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",")
)},
if (!is.null(self$`next_page`)) {
sprintf(
'"next_page":
"%s"
',
self$`next_page`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(EntityAddressesJson) {
EntityAddressesObject <- jsonlite::fromJSON(EntityAddressesJson)
self$`addresses` <- ApiClient$new()$deserializeObj(EntityAddressesObject$`addresses`, "array[Address]", loadNamespace("graphsense"))
self$`next_page` <- EntityAddressesObject$`next_page`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.