API State: Unfinished
Todo
This part of the API is only planned.Do not use anything of this part of the API yet. It will change in the future.
Unfinished
This part of the API is brand-new. It will be changed if there are any bugs, missing features or usability improvements. This part of the API might receive breaking changes within a minor version.It is not recommended relying on this part of the API, it will most likely change.
Draft
Our own usage and testing has shown that this part of the API is complete and seems bug free. However, other plugins may have other use cases which are not covered by our testing. Therefore, please go ahead and use this API part. Let us know if there are missing features or bugs. This API part will be changed if there are more bugs, missing features or usability improvements. We will try to keep it compatible with previous versions if changes are needed. This part of the API won't receive breaking changes within a minor version.Please use this part of the API and give us feedback!
Stable
Both our own and third party testing showed that this part of the API is complete. Only bugs and major conceptual problems would lead to more changes. This part of the API will only change over at least one major version and will likely carry deprecation as long as possible.This part of the API should be safe to use. We try to keep it compatible with previous versions if changes are needed.
Overviewπ
This page intends to give an elaborate overall introduction to the API and all its basic concepts.
What this page covers
What this page does not cover
- What an API is
- How an implementation example might look like
- How to obtain the API
- How to integrate the API into your project
API Structureπ
The API is structured to be intuitive to navigate and grants you access to all its features with short stream-like paths
while retaining the ability to inject parts into your own classes to comply with the Law of Demeter.
The tree-like capsulation of features ensures a narrowing scope as you move down the path.
Chart
---
title: Obtain BetonQuestApi
---
flowchart LR
Service("BetonQuestApiService")
API@{ shape: procs, label: "BetonQuestApi"}
Service target@--> API
target@{ animate: true }
---
title: Access BetonQuestApi Features
---
flowchart LR
API@{ shape: procs, label: "BetonQuestApi"}
subgraph two [Features]
direction LR
profiles("profiles()")
loggerFactory("loggerFactory()")
actions("actions()")
more@{ shape: procs, label: "and more..."}
end
API --> profiles
API --> loggerFactory
API target@--> actions
API --> more
target@{ animate: true }
---
title: Access Feature Details
---
flowchart LR
actions("actions()")
subgraph three [Feature Details]
direction LR
manager("manager()")
registry("registry()")
end
actions target@--> manager
actions --> registry
target@{ animate: true }
---
title: Overview
---
flowchart LR
Service("BetonQuestApiService")
subgraph one [API]
direction LR
API@{ shape: procs, label: "BetonQuestApi"}
subgraph two [Features]
direction LR
profiles("profiles()")
loggerFactory("loggerFactory()")
actions("actions()")
more@{ shape: procs, label: "and more..."}
subgraph three [Feature Details]
direction LR
manager("manager()")
registry("registry()")
end
actions target3@--> manager
actions --> registry
end
API --> profiles
API --> loggerFactory
API target2@--> actions
API --> more
end
Service target1@--> API
target1@{ animate: true }
target2@{ animate: true }
target3@{ animate: true }
Explanation
On the previous page, we learned how to obtain the API.
The highlighted step is equivalent to betonQuestApiService.api(yourPlugin)
Once the API is obtained, we can access the features of the API.
Among these features are the profiles(), loggerFactory(), actions() and many more.
They are partially discussed in more detail in the concepts section below.
Some features have their own pages, which are linked in the sidebar by their name.
The highlighted step is equivalent to betonQuestApi.actions()
Some features have their own sub-features that essentially split up the feature into smaller parts.
Most factory-type features have a manager() and a registry() sub-feature.
Learn more about how BetonQuest uses factories in the concepts section below.
The highlighted step is equivalent to actions.manager()
The API is structured in a way that it is easy to navigate and therefore allowing you to access all features
with short paths while retaining the ability to inject parts into your own classes to comply with the Law of
Demeter.
The highlighted steps are equivalent to betonQuestApiService.api(yourPlugin).actions().manager()