-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add features pages + api reference base
- Loading branch information
Showing
12 changed files
with
88 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
This page is dedicated to the reference of the API. | ||
Here, you will find the all the events that are available with the API, what are their parameters and how to use them. | ||
|
||
!!! Warning "Information" | ||
Please keep in mind that this page is for Experienced users, it requires some technical knowledge. Here is what you need to know: | ||
|
||
* **Lua** | ||
* **BeamMP** (*Server scripting*) | ||
* **General Programming Understanding** | ||
|
||
## **Example of an API Event** | ||
|
||
!!! abstract "API Example Event" | ||
|
||
``` mermaid | ||
sequenceDiagram | ||
participant API as API Implementation | ||
participant BP as BeamPerms | ||
|
||
Note over BP,API: This is an example of an API call <br><br> arg1: string <br> arg2: number <br><br> result1: string <br> result2: number | ||
API->>+BP: "eventName", arg1, arg2 | ||
Note over BP: Process | ||
BP->>-API: result1,result2 | ||
``` | ||
|
||
## **API Initialization Sequence** | ||
???+ abstract "API Initialization Sequence" | ||
|
||
``` mermaid | ||
sequenceDiagram | ||
participant API as API Implementation | ||
participant BP as BeamPerms | ||
|
||
Note over BP,API: Check if BeamPerms is present <br> (If there is an endpoint for the API) | ||
API->>+BP: "checkBpPresence" | ||
alt | ||
Note over BP: Endpoint Found | ||
BP->>-API: true | ||
else | ||
activate BP | ||
Note over BP: Endpoint NOT Found <br> (By default BeamMP will return false) | ||
BP--x-API: false | ||
end | ||
|
||
Note over BP,API: Check if API version is compatible <br><br> API_VERSION: string (Example: "v1.0.0") | ||
API->>+BP: "checkBpApiCompatibility", API_VERSION | ||
alt | ||
Note over BP: Compatibility check is successful | ||
BP->>-API: true | ||
else | ||
activate BP | ||
Note over BP: Compatibility check is NOT successful | ||
BP->>-API: false | ||
end | ||
``` |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
!!! failure "Feature not yet implemented!" | ||
|
||
This feature is not yet implemented, but planned for future releases! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
!!! failure "Feature not yet implemented!" | ||
|
||
This feature is not yet implemented, but planned for future releases! |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters