Index
Get Client Instance (usually you'll start with this)
Basic Linky Application
index.html
<!-- Example basic application. -->
<div class="linky" data-tag="settings"></div>
<script type="module">
import client from 'https://get.linkyio.com/client.js'
console.log(client) // SDK interface.
</script>
Feature Examples
Get SDK interface
main.js
import client from 'https://get.linkyio.com/client.js'
// client = Linky SDK interface.
console.log(client)
Blob Data
.js
//create
const b = new Blob(['hello!'],{type: 'text/plain'})
await client.blob.add(b) // b = File or Blob
// read/query
const l = await client.blob.query() // an empty query means get all.
console.log(l)
Key/Value Pair Data
.js
await client.kv.set('example','hi') // key,value
console.log(await client.kv.get('example')) // "hi"
Extras
Auto-populated Fields
.html
<!-- Include class="linky" and data-tag="field-name" attributes like this...-->
<div class="linky" data-tag="settings">Settings</div>
<div class="linky" data-tag="name">username</div>
<!-- ...client.js will automatically update their content.-->
App List Manifest
index.html
<!doctype html>
<!-- Create an application list for use with App Source(s) -->
<script class="linky" type='text/manifest'>
#my app list
name example 1
link https://app1.example.com
description Example 1 test app.
name example 2
link https://app2.example.com
description Example 2 test app.
# USE
# 1. upload this single index.html file to your webserver - eg https://yourlistname.pages.dev
# 2. use https://yourlistname.pages.dev as your App Source(s) link in linky admin settings.
</script>
<script type='module' src='https://get.linkyio.com/xtra/apps/manifest.js'></script>