Use of amzqr API

This commit is contained in:
fred 2023-09-09 17:11:53 +02:00
parent ac25e42e73
commit 182b665010
2 changed files with 59 additions and 7 deletions

View File

@ -259,7 +259,7 @@ GET /?salt=${SALT}&pepper=${PEPPER}&pay=1&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtH
| `pay` | `integer` | **Required** G1 AMOUNT |
| `g1pub` | `G1PUB` | **Required** destination "wallet key" |
## ➤ PLAYER ZONE (API Station qui héberge ${PLAYER})
## ➤ PLAYER ZONE (disponible uniquement sur la Station qui héberge ${PLAYER})
### ```/?player=${PLAYER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...```
### Exporter Tiddlers.json depuis son TW selon valeur des "tags" ( ici TAG=G1CopierYoutube)
@ -285,13 +285,38 @@ GET /?player=${PLAYER}&youtube=URLENCODED
| `youtube or pdf` | `string` | **Required** URL kind = URL |
## ➤ AMZQR : Create a QRCode with "amzqr"
### ```/?amzqr=${URLENCODEDSTRING}&logo=${IMAGE}```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `amzqr` | `string` | **Required** the qrcode string |
| `logo` | `string` | **Required** ./images/${IMAGE}.png |
check available "logo.png" in [./images](./images)
## ➤ UPLANET : Create Umap, G1Card & G1Visa for PLAYER (email)
### ```/?uplanet=${PLAYER}&salt=${LAT}&pepper=${LON}&g1pub=${PASS}```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `uplanet` | `email` | **Required** Your EMAIL token |
| `salt` | `decimal` | **Required** LATITUDE with 2 decimals digits |
| `pepper` | `decimal` | **Required** LONGITUDE with 2 decimals digits |
| `g1pub` | `string` | **Facultative** choose Umap G1Card PASS |
Create à Umap key (LAT/LON), then a PLAYER TW with GPS as Umap IPNS reference
This API is used by OSM2IPFS code.
DEMO : https://ipfs.copylaradio.com/ipns/copylaradio.com
### QRCODE (API SandBox)
```http
GET /?qrcode=${G1PUB} | ${ASTRONAUTENS} | ${PGP_G1CARD_STRING}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `qrcode` | `string` | **Required**. Your G1PUB token |
| `qrcode` | `string` | **Required**. Your G1PUB or ASTRONAUTENS or PGP_G1CARD token |
> Look for details & extend as you like in [~/.zen/Astroport.ONE/API/QRCODE.sh](API/QRCODE.sh)

View File

@ -51,12 +51,36 @@ header {
background-color: #e7d9fc;
border-radius: 50%;
}
#aframe {
background: white;
color: black;
}
#console {
visibility: hidden;
background: rgba(0, 0, 0, 0.7); /* Adjust the background color and opacity as needed */
color: white;
width: 580px;
height: 580px;
position: absolute;
bottom: 0;
left: 0;
padding: 5px;
box-sizing: border-box;
}
</style>
<!-- Typed text animation -->
<script src="http://127.0.0.1:8080/ipfs/QmYyJmAT3cUbjk4vVWQG7LdpY3HkFH9phFD1VzzetHrgpa"></script>
<!-- Astro API JS LIB -->
<script src="http://127.0.0.1:8080/ipfs/Qmae5v9zydax9u6C9ceDijURu5PYdd5avmv4NkenCw7RFv/astro.js"></script>
<script>
// Prepare QRCode generator for this same page
var currentURL = window.location.href;
const amzURL = encodeURIComponent(currentURL);
const rooturl = currentURL.split('/?')[0];
const qrURL = `${rooturl}/?amzqr=${amzURL}&logo=G1WorldMap`;
console.log('qrURL = ' + qrURL);
</script>
</head>
<body>
<header>
@ -69,6 +93,7 @@ header {
</div>
<span><div id="ainfo"></div></span>
<div id="debug"></div>
<button onclick="document.getElementById('console').style.visibility = 'visible'; homeAstroportStation( qrURL, 'aframe', 3000);">Create UMap QRCode</button>
</header>
@ -89,7 +114,7 @@ header {
<input name='salt' value='0.00'>
<h3><a target="info" title="CHECK BY YOURSELF" href="http://127.0.0.1:12345"> >>> (◕‿‿◕) <<< </a>
</h3>
<input name='pepper' value='0.00'>
<input name='pepper' value='0.00'><br>
</div>
<input type=hidden name=g1pub value=''></br>
(<span id='LAT'></span>:<span id='LON'></span>) registration<br>
@ -98,6 +123,10 @@ header {
</form>
<div id="console"><a href="_STATION_" target="aframe">CONSOLE____________</a> <button onclick="document.getElementById('console').style.visibility = 'hidden';">close</button>
<iframe name="aframe" id="aframe" src="_STATION_" width="100%" height="100%"></iframe>
</div>
<br>
<span><a href="https://pad.p2p.legal/s/Astroport.ONE">Astroport.</a>.<a href="https://github.com/papiche/Astroport.ONE">ONE</a>
<br> - Crypto Commons Playground -</span>
@ -165,8 +194,6 @@ document.addEventListener('DOMContentLoaded', function() {
<script>
const el = document.getElementById('yellow');
//~ const log = document.getElementById('login');
//~ log.style.visibility = 'visible';
setTimeout(() => {
el.style.visibility = 'visible';