DashMachine/dashmachine/docs_system/docs/platform-methods.md
Ross Mountjoy 62191b21b8 ##### Updated to version 0.6!
> Version 0.6 brings DashMachine one big step forward to being a finished product by adding a gui to edit the various settings in the config.ini.

**Changelog**
- improvements to /home including 'pinned' cards, multi-select tag filtering, 'action providers' allowing you to do web searches from the searchbar
- rebuilt sidenav with list view, mirroring filter/search/collapse state of the homepage
- /settings and /home now on same route
- dynamic reloading of settings (no more page reloads)
- dedicated config.ini editor slide-out
- settings editor slide-out
- card editor slide-out
- better access group control
- dedicated documentation pages
- improved documentation
- new system for automatically generating documentation for platforms
- ability to load custom platforms
- added an 'on_starup' method for platforms allowing for registering api routes. (example coming soon)
2020-05-07 09:27:18 -04:00

24 lines
1.2 KiB
Markdown

### Platform Methods
These are the various methods DM will call on your Platform. Some are optional, some are required.
<div class="divider"></div>
##### `def docs(self):` (*required*)
This is the function DM calls to get the metadata about your plaform. This is what DM uses to generate the documentation and options in the gui forms. It is very important that this information is correct.
<div class="divider"></div>
##### `def __init__(self, *args, **kwargs):` (*required*)
This is the initialization function. This should be reserved for setting up the platform's configuration. NOTE: this is not where you call APIs, as this code is run every time DM initializes your 'Platform' class (e.g. to pull documentation, etc).
<div class="divider"></div>
##### `def process(self):` (*required*)
This is the function that is ran when the web client requests information from this platform (e.g. when the dashboard is loaded) this is where you call APIs, or whatever you're doing to get data.
<div class="divider"></div>
##### `def on_startup(self):` (*optional*)
This function is run when DM starts up, this is a great place for registering API routes or installing dependencies.