Classes

  ClassDescription
Public classApplicationStatistics

Examples

CopyC#
Public classAppMetadata
Represents a collection of application level metadata items. You can access this class through the BuddyClient object.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.Metadata.SetAsync(null, "test key", "test value");

// Search for items within a thousand meters of a lat:0.0 and long:0.0.
client.Metadata.FindAsync(null, 1000, 0.0, 0.0);
Public classAppMetadataTaskWrappers
Public classAuthenticatedUser
Represents a user that has been authenticated with the Buddy Platform. Use this object to interact with the service on behalf of the user.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

AuthenticatedUser user;
client.CreateUserAsync((u, state) => {
    user = u;
}, "username", "password");

AuthenticatedUser user2;
client.LoginAsync((u, state) => {
    user2 = u;
}, "username2", "password2");
Public classAuthenticatedUserTaskWrappers
Public classBuddyCallbackParams
Represents an object that wraps a number of different callback return values.
Public classBuddyCallCanceledException
Occurs when an asynchronous call gets cancelled.
Public classBuddyClient
Represents the main class and entry point to the Buddy platform. Use this class to interact with the platform, create and login users and modify general application level properties like Devices and Metadata.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.PingAsync(null);
Public classBuddyClientTaskWrappers
Public classBuddyServiceError
Represents a Buddy Service error. Service errors are usually generated by invoking some of the SDK methods with bad arguments.
Public classBuddyServiceException
Occurs when there is an error processing the service request.
Public classCheckInLocation
Public classDevice
Represents an object that can be used to record device analytics, like device types and app crashes.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// On WinPhone 7
client.RecordInformationAsync((r, state) => { }, System.Environment.OSVersion.Version.ToString(), DeviceExtendedProperties.GetValue("DeviceName").ToString())

// On WinPhone 7 app.xaml.cs global exception handler
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
    BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
    client.Device.RecordCrashAsync((r, state) => { }, e.ExceptionObject.Message, e.ExceptionObject.StackTrace);
    e.Handled = true;
}
Public classDeviceTaskWrappers
Public classFriendRequests
Represents a collection of friend requests. Use the Add method to request a friend connection from another user.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// Create two users
client.CreateUserAsync((user, state) => { 
    client.CreateUserAsync((user2, state2) => { 

        // user sends a friend request to user2.
        user.Friends.FriendRequests.AddAsync((r, state3) => {

            // user2 accepts the friend request.
            user2.FriendRequests.AcceptAsync(null, user);
        }, user2);
    }, "username2", "password2");
}, "username", "password");
Public classFriendRequestsTaskWrappers
Public classFriends
Represents a collection of friends. Use the AuthenticatedUser.Friends property to access this object.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// Create two users
client.CreateAsync((user, state) => { 
    client.CreateAsync((user2, state2) => { 

        // user sends a friend request to user2.
        user.Friends.FriendRequests.AddAsync((r, state3) => {

            // user2 accepts the friend request.
            user2.FriendRequests.AcceptAsync(null, user);
        }, user2);
    }, "username2", "password2");
}, "username", "password");
Public classFriendsTaskWrappers
Public classGameBoards
Represents an object the can be used to retrieve Buddy Game Boards and Scores.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {

    user.GameBoards.AddAsync(null, 100, "My Board", "Master", appTag: "MyTag");

    client.GameBoards.GetHighScores((r, state2) => {
        var scores = r;
    }, "My Board");
}, "username", "password");
Public classGameBoardsTaskWrappers
Public classGamePlayer
Represents a game player object.
Public classGamePlayers
Represents a player in a game. The Player object tracks game specific items such as board, ranks, and other data specific to building game leader boards and other game related constructs.
Public classGamePlayersTaskWrappers
Public classGameScore
Represents an object that describes a single game score entry.
Public classGameScores
Represents a class that can be used to add, retrieve or delete game scores for any user in the system.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {

    user.GameBoards.AddAsync(null, 100, "My Board", "Master", appTag: "MyTag");

    client.GameBoards.GetHighScores((r, state2) => {
        var scores = r;
    }, "My Board");
}, "username", "password", );
Public classGameScoresTaskWrappers
Public classGameState
Represents a single game state object.
Public classGameStates
Represents a class that can be used to add, retrieve or delete game state data for any user in the system.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {

    user.GameState.AddAsync("MyGameState", "MyGameStateValue", (state, p)=>{});

    user.GameState.GetAsync((s, state2) => {
        var value = s.Value;
    }, "MyGameState");
}, "username", "password", );
Public classGameStatesTaskWrappers
Public classGroupMessage
Represets a message that was sent to a group of users through AuthenticatedUser.Messages.Groups.SendMessageAsync.
Public classIdentity
Represents a class that can access identity values for a user or search for values accross the entire app. Identity values can be used to share public information between users, for example hashes of email address that can be used to check whether a certain user is in the system.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {
    var lst = user.IdentityValues.GetAllAsync(null);
}, "username", "password");
Public classIdentityItem
Represents an identity item that belongs to a user.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {
    user.IdentityValues.GetAllAsync(null);
}, "username", "password");
Public classIdentityItemSearchResult
Represents a single identity search result. Use the AuthenticatedUser.IdentityValues.CheckForValues() method to search for items. A search item can belong to any user in the system.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {
    List<IdentityItemSearchResult> items = user.IdentityValues.CheckForValuesAsync((r, ex) => {  }, "somevalue");
}, "username", "password");
Public classIdentityTaskWrappers
Public classMessage
Represents a single message that one user sent to another.
Public classMessageGroup
Represents a single message group. Message groups are groups of users that can message each other. Groups can either be public, with anyone being able to join them, or private - where only the user that create the group can add other users to it.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// On WinPhone 7 - configure push for tiles and toast
client.LoginAsync((user, state) => {
    user.Messages.Groups.CreateAsync((group, state) => { }, "My Group", true);
}, "username", "password");
Public classMessageGroups
Represents an object that can be used to create or query message groups for the app.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// On WinPhone 7 - configure push for tiles and toast
client.LoginAsync((user, state) => {
    user.Messages.Groups.CreateAsync((group, state) => { }, "My Group", true);
}, "username", "password");
Public classMessageGroupsTaskWrappers
Public classMessageGroupTaskWrappers
Public classMessages
Represents an object that can be used to send message from one user to another.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// On WinPhone 7 - configure push for tiles and toast
client.LoginAsync((user, state) => {
    user.Messages.SendAsync((r, state) => { }, someOtherUser, "Some Message");
}, "username", "password");
Public classMessagesTaskWrappers
Public classMetadataItem
Represents a single item of metadata. Metadata is used to store custom key/value pairs at the application or user level.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, ex) => {
    user.Metadata.GetAsync((item, state) => {
        item.SetAsync(null, "some value");
    }, "some key");
}, "username", "password");
Public classMetadataItemTaskWrappers
Public classMetadataSum
Represents the sum of a collection of metadata items with a similar key.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.Metadata.SetAsync(null, "Test count1", "10");
client.Metadata.SetAsync(null, "Test count2", "20");
client.Metadata.SetAsync(null, "Test count3", "30");
client.Metadata.SumAsync((sum, ex) => {  }, "Test count");
Public classNotifications
Represents an object that you can use to send or recieve push notifications. Note that you can only recieve phone notifications on Windows Phone or Windows 8 Metro Apps.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

// On WinPhone 7 - configure push for tiles and toast
client.LoginAsync((user, state) => {
    user.PushNotifications.ConfigurePushAsync((r, state2) => {

        // Send myself a toast
        user.PushNotifications.SendToastMessageAsync(null, "test title", "test", "test", user.ID);
    }, "My Channel", true, true, toastMessageCallback: (msg) => {

        Dispatcher.BeginInvoke(() => { MessageBox.Show("TOAST!!!"); });
    });
}, "username", "password");
Public classNotificationsAndroid
Represents an object that can be used to register Android devices for push notifications. The class can also be used to query for all registered devices and to send them notifications.
Public classNotificationsAndroidTaskWrappers
Public classNotificationsApple
Represents an object that can be used to register Apple devices for push notifications. The class can also be used to query for all registered devices and to send them notifications.
Public classNotificationsAppleTaskWrappers
Public classNotificationsTaskWrappers
Public classNotificationsWin8
Represents an object that can be used to register Win8 devices for push notifications. The class can also be used to query for all registered devices and to send them notifications.
Public classNotificationsWin8TaskWrappers
Public classPhotoAlbum
Represent a single Buddy photo album. Albums are collections of photo that can be manipulated by their owner (the user that created the album). Albums can be public in which case other users can see them (but no modify).

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

client.LoginAsync((user, state) => {
    user.PhotoAlbums["test album"].AddPicture(pictureBineryData);
}, "username", "password");
Public classPhotoAlbumPublic
Represents a public photo album. Public albums are returned from album searches.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

client.LoginAsync((user, state) => {
    user.SearchForAlbumsAsync((result, state2) => {});
}, "username", "password");
Public classPhotoAlbums
Represents a object that can be used to interact with an AuthenticatedUser's photo albums.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

client.LoginAsync((user, state) => {
    user.PhotoAlbums.GetAllAsync((albums, state2) => { });
}, "username", "password");
Public classPhotoAlbumsTaskWrappers
Public classPhotoAlbumTaskWrappers
Public classPicture
Represents a single picture on the Buddy Platform. Pictures can be accessed through an AuthenticatedUser, either by using the PhotoAlbums property to retrieve Pictures that belong to the user, or using the SearchForAlbums method to find public Pictures.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {
    user.SearchForAlbums((albums, state2 => {
        Picture p = album.Pictures[0];
    });
}, "username", "password");
Public classPicturePublic
Represents a single picture on the Buddy Platform. This is a public view of a picture, can be retrieve either by getting a User's profile pictures or by searching for albums.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

client.LoginAsync((user, state) => {
    user.GetProfilePhotosAsync((pics, state2) => { });
}, "username", "password");
Public classPictureTaskWrappers
Public classPlace
Represents a single, named location in the Buddy system that's not a user. Locations are related to stores, hotels, parks, etc.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {
    user.Places.Find((places, state2) => {  }, 1000000, 0.0, 0.0);
}, "username", "password");
Public classPlaces
Represents an object that can be used to search for physical locations around the user.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync((user, state) => {
    user.Places.Find((places, state2) => {  }, 1000000, 0.0, 0.0);
}, "username", "password");
Public classPlacesTaskWrappers
Public classPlaceTaskWrappers
Public classRegisteredDevice
Public classRegisteredDeviceAndroid
Public classRegisteredDeviceApple
Public classRegisteredDeviceWin8
Public classServiceUnkownErrorException
Occurs when an unkown error is returned from the service. Possible causes are network issues, service disruption, etc.
Public classUser
Represents a public user profile. Public user profiles are usually returned when looking at an AuthenticatedUser's friends or making a search with FindUser.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");
client.LoginAsync("username", "password", (user, state) => {

    // Return all users for this application.
    user.FindUserAsync((users, state2) => { });
});
Public classUserMetadata
Represents an object used to access and modify user metadata items. You need an AuthenticatedUser to access this class.

Examples

CopyC#
BuddyClient client = new BuddyClient("APPNAME", "APPPASS");

client.LoginAsync((user, state) => {
    user.Metadata.SetAsync((r, state2) => {

        // Search for items within a thousand meters of a lat:0.0 and long:0.0.
        user.Metadata.Find(1000, 0.0, 0.0);
    },"test key", "test value");
}, "username", "password");
Public classUserMetadataTaskWrappers
Public classUserTaskWrappers
Public classVirtualAlbum
Represents a single virtual album. Unlike normal photoalbums any user may add existing photos to a virtual album. Only the owner of the virtual album can delete the album however.
Public classVirtualAlbums
Represents a class that can be used to interact with virtual albums. Unlike normal photoalbums any user may add existing photos to a virtual album. Only the owner of the virtual album can delete the album however.
Public classVirtualAlbumsTaskWrappers
Public classVirtualAlbumTaskWrappers

Enumerations

  EnumerationDescription
Public enumerationUserGender
Represents the gender of a user.
Public enumerationUserStatus
Represents the status of the user.