| The Following 3 Users Say Thank You to juiceme For This Useful Post: | ||
|
|
2020-08-22
, 10:48
|
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, España
|
#102
|

function requestWeatherData(cntr) {
var xhr = new XMLHttpRequest;
xhr.open("GET", `MY API KEY AND ID HERE`);
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
cntr.weatherData = JSON.parse(xhr.responseText)
}
}
xhr.send();
}
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
|
2020-08-23
, 08:50
|
|
Posts: 284 |
Thanked: 661 times |
Joined on Aug 2013
@ Finland
|
#103
|
let url = 'https.//www.example.com?api_key=' + API_key;
let response = await fetch(url); let data = await response.json(); // parse data here
|
|
2020-08-23
, 14:42
|
|
Posts: 479 |
Thanked: 1,284 times |
Joined on Jan 2012
@ Enschede, The Netherlands
|
#104
|
|
|
2020-08-23
, 18:53
|
|
Posts: 284 |
Thanked: 661 times |
Joined on Aug 2013
@ Finland
|
#106
|
api.openweathermap.org/data/2.5/forecast?zip={zip code},{country code}&appid={your api key}
|
|
2020-08-26
, 09:01
|
|
Posts: 301 |
Thanked: 531 times |
Joined on Aug 2010
@ The Netherlands
|
#107
|
Button {
height: Theme.itemSizeMedium
preferredWidth: Theme.buttonWidthLarge
anchors.horizontalCenter: parent.horizontalCenter
text: letter + " = " + (lettervalue === "" ? "<?>" : lettervalue) + qsTr(". Click to change")
onClicked: {
generic.lettEdit = letter
pageStack.push(Qt.resolvedUrl("LetterPage.qml"),
{"lettervalue": lettervalue})
listModelLett.updateLett();
}
}
| The Following User Says Thank You to rob_kouw For This Useful Post: | ||
|
|
2020-08-28
, 09:27
|
|
Posts: 301 |
Thanked: 531 times |
Joined on Aug 2010
@ The Netherlands
|
#109
|
import QtQuick 2.0
import Sailfish.Silica 1.0
import "../scripts/Database.js" as Database
Page {
id: thisWayptPage
ListModel {
id: listModelLett
function updateLett()
{
listModelLett.clear();
var lettrs = Database.getLettersWP(generic.wpId);
for (var i = 0; i < lettrs.length; ++i) {
listModelLett.append(lettrs[i]);
}
}
}
Component.onCompleted: listModelLett.updateLett();
SilicaFlickable {
PageHeader { ... }
Column {
TextArea { ... }
Repeater {
model: listModelLett
ListItem {
Button {
text: letter + qsTr(". Click to change")
onClicked: {
pageStack.push(Qt.resolvedUrl("LetterPage.qml"),
{"letterid": letterid})
}
}
}
}
}
}
}
| The Following User Says Thank You to rob_kouw For This Useful Post: | ||
|
|
2020-08-28
, 13:03
|
|
Posts: 301 |
Thanked: 531 times |
Joined on Aug 2010
@ The Netherlands
|
#110
|
| The Following User Says Thank You to rob_kouw For This Useful Post: | ||
The way to learn is to read the file and see what changes the patch is making, just like @coderus said.
Dave999: Meateo balloons. What’s so special with em? Is it a ballon?