Download presentation
Presentation is loading. Please wait.
Published byConrad Broyhill Modified over 10 years ago
1
touchdevelop api api: web downloading and uploading Disclaimer: This document is provided as-is. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and Windows Live are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.
2
touchdevelop api web o internet connectivity o downloading, uploading o Json, RSS, XML o search
3
touchdevelop api apis: connection o Webopen connection settings Opens a connection settings page (airplanemode, bluetooth, wiki, cellular) Webopen connection settings o Webis connected Indicates whether any network connection is available Webis connected o Webconnection name Gets a name of the currently connected network servicing Internet requests Webconnection name o Webconnection type Gets the type of the network servicing Internet requests (unknown, none, ethernet, wifi, mobile) Webconnection type
4
touchdevelop api apis: download/upload o Webdownload Downloads the content of an internet page (http get) Webdownload o Webdownload picture Downloads a picture from internet Webdownload picture o Webdownload json Downloads a web service response as a JSON data structure (http get) Webdownload json o Webdownload sound Downloads a WAV sound file from internet Webdownload sound o Webdownload song Create a streamed song file from internet (download happens when playing) Webdownload song o Webupload Uploads text to an internet page (http post) Webupload o Webupload picture Uploads a picture to an internet page (http post) Webupload picture
5
touchdevelop api apis: formats o Webxml Parses the string as a xml element Webxml o Webjson Parses the string as a json object Webjson o Webrss Parses the newsfeed string (RSS 2.0) into a message collection Webrss o Weburl encode Converts a text string into an url-encoded string Weburl encode o Weburl decode Decodes a string that has been url-encoded Weburl decode o Webhtml encode Converts a text string into an HTML-encoded string Webhtml encode o Webhtml decode Decodes a string that has been HTML-encoded Webhtml decode
6
touchdevelop api json grammar json:string | number | boolean | array | object string/number/boolean follow grammar of corresponding JavaScript literals array: [ [json (, comma)*] ] field: string : json object: [ field [(, field)*] ] example [ elem0, 1, { x : value of field x, y : 42 }, false ]
7
touchdevelop api apis: json o Webdownload json Downloads a web service response as a JSON data structure Webdownload json o Json Objectkind Gets a json kind (string, number, boolean, object, array) Json Objectkind o string: Json Objectto stringJson Objectto string o number: Json Objectto numberJson Objectto number o boolean: Json Objectto booleanJson Objectto boolean o object: Json Objectkeys, Json ObjectfieldJson ObjectkeysJson Objectfield o array: Json Objectat, Json ObjectcountJson ObjectatJson Objectcount o
8
touchdevelop api apis: json o Webdownload json Downloads a web service response as a JSON data structure Webdownload json o Json Objectkind Gets a json kind (string, number, boolean, object, array) Json Objectkind o string: Json Objectto stringJson Objectto string o number: Json Objectto numberJson Objectto number o boolean: Json Objectto booleanJson Objectto boolean o object: Json Objectkeys, Json ObjectfieldJson ObjectkeysJson Objectfield o array: Json Objectat, Json ObjectcountJson ObjectatJson Objectcount o
9
touchdevelop api apis: web search o Websearch Searching the web using Bing Websearch o Websearch images Websearch images o Websearch news Websearch news o Websearch phone numbers nearby Websearch phone numbers nearby o Websearch nearby Websearch nearby o Websearch news nearby Websearch news nearby o Websearch images nearby Websearch images nearby o Websearch phone numbers Websearch phone numbers
10
touchdevelop api apis: links o Webplay media Plays an internet audio/video in full screen Webplay media o Webbrowse Opens a web browser to a url Webbrowse o Weblink url Creates a link to an internet page Weblink url o Weblink media Creates a link to an internet audio/video Weblink media o Weblink image Creates a link to an internet image Weblink image o
11
touchdevelop api examples o airplane easy http://touchdevelop.com/julrhttp://touchdevelop.com/julr o stackoverflow search http://touchdevelop.com/kvcbhttp://touchdevelop.com/kvcb o show todays Bing image http://touchdevelop.com/algihttp://touchdevelop.com/algi
12
touchdevelop api exercises write script that scans https://www.touchdevelop.com/new-comments/rss for mentionings of Argentina https://www.touchdevelop.com/new-comments/rss
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.