Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


Web

Search and browse the web...
function web → base64 decode(text : String) returns String
Decodes a string that has been base64-encoded (assuming utf8 encoding)
function web → base64 encode(text : String) returns String
Converts a string into an base64-encoded string (with utf8 encoding)
function web → browse(url : String)
Opens a web browser to a url
function web → connection name returns String
Gets a name of the currently connected network servicing Internet requests. Empty string if no connection.
function web → connection type returns String
Gets the type of the network servicing Internet requests (unknown, none, ethernet, wifi, mobile)
function web → create event source(url : String) returns Web Event Source
Opens an Server-Sent-Events client on the given URL. If not supported, returns invalid. The server must implement CORS to allow https://www.touchdevelop.com to receive messages.
function web → create form builder returns Form Builder
Create a form builder
function web → create json builder returns Json Builder
Creates a json builder
function web → create request(url : String) returns Web Request
Creates a web request
function web → csv(text : String, delimiter : String) returns Json Object
Parses a Command Separated Values document into a JsonObject where the headers is a string array of column names; records is an array of rows where each row is itself an array of strings. The delimiter is inferred if not specified.
function web → decode uri(url : String) returns String
Decodes a URI component
function web → decode uri component(url : String) returns String
Decodes a URI component
function web → download(url : String) returns String
Downloads the content of an internet page (http get)
function web → download json(url : String) returns Json Object
Downloads a web service response as a JSON data structure (http get)
function web → download picture(url : String) returns Picture
Downloads a picture from internet
function web → download song(url : String, name : String) returns Song
Create a streamed song file from internet (download happens when playing)
function web → download sound(url : String) returns Sound
Downloads a WAV sound file from internet
function web → download xml(url : String) returns Xml Object
Downloads a web service response as a XML data structure (http get)
function web → encode uri(text : String) returns String
Encodes a uri component
function web → encode uri component(text : String) returns String
Encodes a uri component
function web → feed(value : String) returns Collection of Message
Parses the newsfeed string (RSS 2.0 or Atom 1.0) into a message collection
function web → html decode(html : String) returns String
Decodes a string that has been HTML-encoded
function web → html encode(text : String) returns String
Converts a text string into an HTML-encoded string
function web → is connected returns Boolean
Indicates whether any network connection is available
function web → json(value : String) returns Json Object
Parses the string as a json object
function web → json array returns Json Object
Returns an empty json array
function web → json object returns Json Object
Returns an empty json object
function web → link image(url : String) returns Link
Creates a link to an internet image
function web → link media(url : String) returns Link
Creates a link to an internet audio/video
function web → link url(name : String, url : String) returns Link
Creates a link to an internet page
function web → oauth token from json(response : Json Object) returns OAuth Response
Parses a OAuth v2.0 access token from a JSON payload as described in http://tools.ietf.org/html/rfc6749. Returns invalid if the payload is not an OAuth token.
function web → oauth token from url(redirect url : String) returns OAuth Response
Parses a OAuth v2.0 access token from a redirect uri as described in http://tools.ietf.org/html/rfc6749. Returns invalid if the url does not contain an OAuth token.
function web → oauth v2(oauth url : String) returns OAuth Response
Authenticate with OAuth 2.0 and receives the access token or error. See oauthv2 for more information on which Redirect URI to choose.
function web → on received message from parent(origin : String, received : Json Action) returns Event Binding
Attaches code to run when a message is received. Only messages from the parent window and origin will be received.
function web → open connection settings(page : String)
Opens a connection settings page (airplanemode, bluetooth, wifi, cellular)
function web → open web socket(url : String) returns Web Socket
Creates a web socket
function web → picture(url : String) returns Picture
Creates a picture from a web address. The resulting picture cannot be modified, use clone if you want to change it.
function web → play media(url : String)
Plays an internet audio/video in full screen
function web → post message to parent(target origin : String, message : Json Object)
Posts a message to the parent window if any. The target origin must match the domain of the parent window, * is not accepted.
function web → redirect(url : String)
[beta] Redirects the browser to a url; only available when exporting
function web → search(query : String) returns Collection of Link
Searching the web using Bing
function web → search images(query : String) returns Collection of Link
Searching images using Bing
function web → search images nearby(query : String, location : Location, distance : Number) returns Collection of Link
Searching images near a location using Bing. Distance in meters, negative to ignore.
function web → search nearby(query : String, location : Location, distance : Number) returns Collection of Link
Searching the web near a location using Bing. Distance in meters, negative to ignore.
function web → search news(query : String) returns Collection of Link
Searching news using Bing
function web → search news nearby(query : String, location : Location, distance : Number) returns Collection of Link
Searching news near a location using Bing. Distance in meters, negative to ignore.
function web → upload(url : String, body : String) returns String
Uploads text to an internet page (http post)
function web → upload picture(url : String, pic : Picture) returns String
Uploads a picture to an internet page (http post)
function web → upload sound(url : String, snd : Sound) returns String
Uploads a sound to an internet page (http post). The sound must have been recorded from the microphone.
function web → wait for message from parent(origin : String) returns Json Object
Waits for the next message from the parent window in origin.
function web → xml(value : String) returns Xml Object
Parses the string as a xml element

edit this topic dkbvwojiaq