« Utilisateur:Tenbergen/gadgetdata » : différence entre les versions
De Semantic MediaWiki - Sandbox
Balise : Éditeur de wikicode 2017 |
Balises : Nouvelle redirection Éditeur de wikicode 2017 |
(7 versions intermédiaires par le même utilisateur non affichées) |
Ligne 1 : |
Ligne 1 : |
| I am setting up a Raspberry Pi that will read a semantic value from this page and use that value to drive a motor - in this context I'll just call it "the gadget".
| | #redirect: [[GadgetData]] |
| | | Turns out other users can't edit my user page... is that normal wiki behavior or special to this one? |
| == setting the value ==
| |
| This page encodes as [[Property:GadgetTestProperty]] the following:
| |
| * [[GadgetTestProperty::4]]
| |
| * SMW could encode more, but for now let's have one so my gadget doesn't have to error check.
| |
| | |
| == API code to read it ==
| |
| The following will query what the value of [[Property:TestProperty]] for this page:
| |
| * '''<nowiki> https://sandbox.semantic-mediawiki.org/w/api.php?action=ask&query=[[Utilisateur:Tenbergen/gadgetdata]]|?GadgetTestProperty&format=json </nowiki>'''
| |
| | |
| The following will query for the page that contains this value:
| |
| * <nowiki> https://sandbox.semantic-mediawiki.org/w/api.php?action=ask&query=[[GadgetTestProperty::My%20tummy%20feels%20funny.]]&format=json </nowiki>
| |
| | |
| | |
| The following will return all properties for this page:
| |
| * <nowiki> https://sandbox.semantic-mediawiki.org/w/api.php?action=browsebysubject&subject=Utilisateur:Tenbergen/gadgetdata&format=json </nowiki>
| |
Dernière version du 27 mars 2019 à 03:10
Turns out other users can't edit my user page... is that normal wiki behavior or special to this one?
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.