Created
August 22, 2014 00:34
-
-
Save YutaWatanabe/0f06c44ad757b523e950 to your computer and use it in GitHub Desktop.
Create and read items with Azure Mobile Service.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// MobileServiceClient のインスタンスを作成 | |
// URL, KEY は管理画面に表示されているものを貼り付け | |
var client = new WindowsAzure.MobileServiceClient( | |
"URL", | |
"KEY" | |
); | |
// Item テーブルのインスタンス取得 | |
var itemTable = client.getTable("Item"); | |
// Item テーブルに項目追加 | |
itemTable.insert({ text:"Sample Item"}); | |
// Item テーブルの項目を読出し | |
itemTable.read().then(function(items){ | |
console.log(items); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment