Code Monkey home page Code Monkey logo

mainzelliste-connector's Introduction

MainzellisteConnectoR

codecov pipeline status coverage report CRAN Status Badge Cran Checks

The R package MainzellisteConnectoR provides utility functions used to access a running Mainzelliste-Instance.

Installation

The development version can be installed using

install.packages("devtools")
devtools::install_github("joundso/mainzelliste-connector", ref = "development")

Basic functions

Pseudonymize a value(set)

Without setting the environment variables

res <- MainzellisteConnectoR::pseudonymize(
  MAINZELLISTE_BASE_URL = "https://your-organization.org",
  MAINZELLISTE_API_KEY = "123456789abcdef",
  MAINZELLISTE_FIELDNAME = "ishid",
  mainzelliste_fieldvalue = c(123, 456, "abc")
)

## Result (e.g.):
res
#       123        456        abc
# "000C30WP" "T4ECWT4Q" "Y2FAYH5D"

With setting the environment variables

Simply fill a .env file:

## Save this e.g. as '.env'
MAINZELLISTE_BASE_URL=https://your-organization.org
MAINZELLISTE_API_KEY=123456789abcdef
MAINZELLISTE_FIELDNAME=ishid

then read in the file and assign all variables to the environment:

## Read in the '.env' file:
DIZutils::set_env_vars(env_file = "./.env")

## And use the smaller function call:
res <- MainzellisteConnectoR::pseudonymize(
  mainzelliste_fieldvalue = c(123, 456, "abc"),
  from_env = TRUE
)

## Result (e.g.):
res
#       123        456        abc
# "000C30WP" "T4ECWT4Q" "Y2FAYH5D"

Accessing the result

## Result (e.g.):
res
#       123        456        abc
# "000C30WP" "T4ECWT4Q" "Y2FAYH5D"

## The result is a named list and can be accessed like this:
## Access the element with the name "123" (and receive a single-item-list):
res["123"]
# Result:
#        123 
#  "000C30WP"

## Access the element with the name "123" (and receive a string):
res[["123"]]
# Result:
# "000C30WP"

## Access the first element (and receive a string):
res[[1]]
# Result:
# "000C30WP"

De-Pseudonymize a value(set)

This is exactly the same like pseudonymizing, but use MainzellisteConnectoR::depseudonymize instead of MainzellisteConnectoR::pseudonymize.

More Infos

mainzelliste-connector's People

Contributors

joundso avatar

Stargazers

 avatar

Watchers

 avatar

mainzelliste-connector's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

None detected


  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.