Thanks Jeremy,

Before I give up on a Single file wiki solution, because it is easy to host 
a simple html file. A Little more details. It looks to me that some of the 
limitations to which you refer may not apply in this case.

The solution I want to use has 
   
   - Shell <https://docs.what3words.com/api/v2/#forward-shell> 
   - jQuery <https://docs.what3words.com/api/v2/#forward-jquery> 
   - Node.js <https://docs.what3words.com/api/v2/#forward-node> 
   - PHP <https://docs.what3words.com/api/v2/#forward-php> 
   - Python <https://docs.what3words.com/api/v2/#forward-python> 
   - Ruby <https://docs.what3words.com/api/v2/#forward-ruby>

API methods. can return JSO, GeoJSON, XML and an API Key is required.

I have already found a Working Iframe <iframe 
src='https://w3w.co/index.home.raft' frameborder="0" width="100%"; 
height="600"></iframe> for a map view

and here is a working example of the simple api call 
https://api.what3words.com/v2/forward?addr=index.home.raft&key=891XDNQL Click 
to see what is returned.

Regards
Tony



On Wednesday, 20 February 2019 19:48:02 UTC+11, Jeremy Ruston wrote:
>
> Hi Tony
>
> HTTP GET is available under Node.js via the fetch command. The way to 
> expose HTTP GET operations to wikitext in the browser would actually be via 
> a message because the transfer needs to be initiated at a particular time 
> -- remember that rendering widgets should not have side effects.
>
> But the challenges are browser security: primarily CORS, which is a 
> mechanism introduced by browsers specifically to prevent one website from 
> grabbing data from another one; it is necessary to avoid certain kinds of 
> cross site scripting attacks.
>
> https://en.wikipedia.org/wiki/Cross-origin_resource_sharing
>
> Secondarily, some browsers don't permit GET requests to be made from pages 
> loaded from file: URIs.
>
> There are workarounds (notably something called JSONP), but the cleanest 
> solution is to use the client-server configuration and let the server do 
> the HTTP requests.
>
> There is a pending patch that makes it possible for wikitext in the 
> browser to invoke commands on the server (including fetch):
>
> https://github.com/Jermolene/TiddlyWiki5/tree/external-tasks
>
> Best wishes
>
> Jeremy.
>
>
> --
> Jeremy Ruston
> [email protected] <javascript:>
> https://jermolene.com
>
> On 20 Feb 2019, at 09:35, TonyM <[email protected] <javascript:>> 
> wrote:
>
> Folks,
>
> I have a 3rd party resource that provides me with some urls that returns 
> some values. If I place the URL in the Browser address bar I see the result.
>
> eg
>
> {"thanks":"Thanks from all of us at filled.count.soap for using a what3words 
> API","crs":{"type":"link","properties":{"href":"http:\/\/spatialreference.org\/ref\/epsg\/4326\/ogcwkt\/","type":"ogcwkt"}},"words":"index.home.raft","bounds":{"southwest":{"lng":-0.203607,"lat":51.521238},"northeast":{"lng":-0.203564,"lat":51.521265}},"geometry":{"lng":-0.203586,"lat":51.521251},"language":"en","map":"https:\/\/w3w.co\/index.home.raft","status":{"reason":"OK","status":200}}
>
>
> Is there a way, or could be there be a way for me to provide the URI and 
> have the result returned in a tiddler or "text reference" that I could then 
> interrogate?
>
> I imagine it will need a trigger widget, and would likely be an action 
> widget but is there an existing way?
>
> Would it be hard or dangerous to provide such? 
>
> If this were so, For me I can build an API connection without learning 
> developer tricks right now (Which I will eventually).
>
> It would also be nice if we could load anything at a URI into a tiddler. 
> From a JSON, a Plugin Tiddler, the content of another wikis tiddler, or 
> even a post in another platform into a tiddler.
>
> Regards
> Tony
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywikidev.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/98603efa-4059-4367-88bf-2b2f5b476686%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/98603efa-4059-4367-88bf-2b2f5b476686%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2e4ac6ad-c7ed-4f56-a74d-ef4dcf60c3bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to