Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Secure and Intuitive Access to 'Plug' <https://plugbytpf.com.br> Application Interface

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

StrategicProjects/plug

Repository files navigation

CRAN_Status_Badge  

ThePlug API Integration Package provides an intuitive and secureinterface to interact with the Plug API. It enables developers to storeuser credentials securely, fetch data using custom SQL queries, andmanage 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 SQLqueries must adhere to Microsoft SQL Server syntax (e.g.,SELECT TOP 1 instead ofLIMIT).

Installation

You can install the development version of the package directly fromGitHub:

# Install devtools if not already installedinstall.packages("devtools")# Install the packagedevtools::install_github("StrategicProjects/plug")

Features

  • Secure Credential Storage: Safely store and retrieve usercredentials with keyring.
  • Token Management: Automatically handle API token generation andexpiration.
  • Query Execution: Execute custom SQL queries securely using thePlug API.
  • Data Download: Retrieve all data from specific tables with ease.

Getting Started

Before using the package, you need to store your Plug API credentialssecurely:

# Store your username and passwordplug_store_credentials("your_username","your_password")

Fetching a Token

The package automatically fetches and caches an authentication token. Ifyou need to retrieve it manually, use:

# Fetch a valid tokentoken<- plug_get_valid_token()

Listing Stored Credentials and Tokens

You can list stored credentials and tokens:

# List credentialscredentials<- plug_list_credentials()print(credentials)# List tokenstokens<- plug_list_tokens()print(tokens)

Executing SQL Queries

ou can execute custom SQL queries on the Plug API:

# Example: Execute a querydata<- plug_execute_query(sql_template="SELECT * FROM Contratos_VIEW LIMIT 1")
# Example: Download All Data from a Tabledata<- plug_download_base(base_name="Contratos_VIEW")print(data)

Development

This package is under active development. Contributions are welcome! Ifyou encounter any issues, please open an issue on GitHub.

License

This package is licensed under the MIT License.

About

Secure and Intuitive Access to 'Plug' <https://plugbytpf.com.br> Application Interface

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp