MobileServiceClient object

Enables your Windows Store app to access and work with a specific Microsoft Azure Mobile Services instance.

var mobileServiceClient = new WindowsAzure.MobileServices.MobileServiceClient(applicationUrl, applicationKey);

Members

This object contains the following members:

Constructor

MobileServiceClient

Methods

Method Description

getTable

Gets a reference to a table and its data operations.

invokeApi

Calls a custom API defined in the mobile service.

login

Logs a user into the mobile service using an access token.

logout

Logs a user out of the mobile service.

withFilter

Creates a new MobileServiceClient instance with a filter used to process all of its HTTP requests and responses.

Properties

Property Description

applicationKey

The application key of the mobile service.

applicationUrl

The URL to the mobile service.

currentUser

The current user.

Example

The following code creates a new client object to access the todolist mobile service and create a new proxy object for the TodoItem table.

var mobileService = new WindowsAzure.MobileServiceClient(
        "todolist.azure-mobile.net",
        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    );

var todoTable = mobileService.getTable('TodoItem');

Remarks

.NET Framework Equivalent

MobileServiceClient

Requirements

Namespace

WindowsAzure.MobileServices

Library

MobileServices.js

See Also

Concepts

Client library for JavaScript

Other Resources

Get started with data in Mobile Services
How to use an HTML/JavaScript client for Azure Mobile Services