Skip to content

Creating Enhanced Apps

KodeStar edited this page Nov 4, 2018 · 6 revisions

First thing to do is either download the enhanced app zip from the request site. If a foundation app already exists find it and click the request enhanced app button, then download the zip. If there isn't already a request, create the request first. This is very important.

Once you have your zip, extract it to the app/SupportedApps/ folder of your dev environment.

Type php artisan register:app FolderName so if you have just extracted the Emby folder to SupportedApps you would type php artisan register:app Emby. This will register the app locally so you can develop and test locally before publishing.

There are 3 files you need to be concerned about

  • [Appname].php
  • livestats.blade.php
  • config.blade.php

[Appname].php

This is the main class file.

test()

This is for testing

livestats()

This is the data that needs to be sent to the livestats.blade.php view file.

url()

This function returns a normalised url that is used for api calls.

livestats.blade.php

This is the blade file that will display livestats on your tile, anything you want to display to the user goes here. The variables are fed to this file from the livestats() function in App.php

config.blade.php

This is where you gather all the required information off the user in order to interact with the API. This by default includes an override url, username, password and an active toggle, you can change these to be whatever you need.