The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The Plug API Integration Package provides an intuitive and secure interface to interact with the Plug API. It enables developers to store user credentials securely, fetch data using custom SQL queries, and manage authentication tokens automatically.
Note: To access the Plug API, you must have valid credentials (username and password) provided by the API administrators.
Note: Plug uses Microsoft SQL as its database system, so SQL queries must adhere to Microsoft SQL Server syntax (e.g.,
SELECT TOP 1
instead ofLIMIT
).
You can install the development version of the package directly from GitHub:
# Install devtools if not already installed
install.packages("devtools")
# Install the package
::install_github("StrategicProjects/plug") devtools
Before using the package, you need to store your Plug API credentials securely:
# Store your username and password
plug_store_credentials("your_username", "your_password")
The package automatically fetches and caches an authentication token. If you need to retrieve it manually, use:
# Fetch a valid token
<- plug_get_valid_token() token
You can list stored credentials and tokens:
# List credentials
<- plug_list_credentials()
credentials print(credentials)
# List tokens
<- plug_list_tokens()
tokens print(tokens)
ou can execute custom SQL queries on the Plug API:
# Example: Execute a query
<- plug_execute_query(sql_template = "SELECT * FROM Contratos_VIEW LIMIT 1") data
# Example: Download All Data from a Table
<- plug_download_base(base_name = "Contratos_VIEW")
data print(data)
This package is under active development. Contributions are welcome! If you encounter any issues, please open an issue on GitHub.
This package is licensed under the MIT License.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.