Skip to content
Niout edited this page Jul 11, 2020 · 3 revisions

Pulse-API

Intro

You're about to read the Pulse-API documentation ! If you have some notices about it you can contact the author on discord at Niout#3761 or RenardFute#0001. This api has been created in order to facilitate the creation of minecraft plugin.


Table of contents

Data Management

SQL Connection

You can add a data base thanks to a sql connection easier. To add a sql connection you just have to follow this example :

SQL sql = new SQL("jdbc:mysql//", "YOUR-HOST-HERE", "YOUR-PORT-HERE", "YOUR-DATABASE-HERE", "YOUR-USER-HERE", "YOUR-PASSWORD-HERE");

With this SQL connection, you can do some actions:

  • If you want create a new table, you can use the SQLBuilder:
    1. First, you must initiate a new SQLBuilder : SQLBuilder sqlBuilder = new SQLBuilder("YOUR-TABLE-NAME").
    2. Second, you can add column to this table : sqlBuilder.addColumn("YOUR-COLUMN-NAME", "YOUR-COLUMN-TYPE", "DEFAULT-VALUE", OPTIONAL-OPTIONS)
    3. And finally, to push the SQL request and create the table : sqlBuilder.init(sql)
  • You can also get information from the data base by using SQLManager:
    1. First, you must initiate a new SQLManager : SQLManager sqlManager = new SQLManager(sql)
    2. Second, you can get string or integer or all other object: sqlManager.getString("TABLE-NAME", "VALUE-NAME", "VALUE", "COLUMN-NAME"); sqlManager.getInt("TABLE-NAME", "VALUE-NAME", "VALUE", "COLUMN-NAME"); sqlManager.get("TABLE-NAME", "VALUE-NAME", "VALUE", "COLUMN-NAME")
    3. And finally, you can insert values : sqlManager.insert("TABLE-NAME", LIST_OF_VALUE_NAMES, LIST_OF_VALUES)

Redis Connection

[THIS SECTION IS NOT COMPLETLY FINISH, THE DOCUMENTATION WILL BE ADD LATER SORRY]

Clone this wiki locally