Latest 1.1.0
Homepage https://github.com/sandalsoft/SSXboxLeaders
License MIT
Platforms ios 5.0, requires ARC
Frameworks SystemConfiguration
Authors

Objective-C wrapper for XboxLeaders.com API

SSXboxLeaders is a block-based Objective-C class that wraps the xboxleaders.com API for easier use in IOS and OS X projects.

There is a demo app included to show basic functionality of the library. It’s very basic, with minimal error checking nor GUI updates, but it works.

Example

Get profile of a gamertag

 NSString *gamerTag = @"theholyboot";

    [SSXboxLeaders fetchGamerProfile:gamerTag success:^(GamerProfile *profile) {
        NSLog(@"Profile details: %@", [profile description]);
    } failure:^(NSError *error) {
        NSLog(@"Error: %@", error);
    }];

Get list of games a gamer has played, and use it as the data source for a UITableView

NSString *gamerTag = @"theholyboot";

    [SSXboxLeaders fetchGamesPlayed:gamerTag success:^(NSArray *gamesPlayed) {
        self.gamesList = gamesPlayed;
        [self.gamesTableView reloadData];
    } failure:^(NSError *error) {
        NSLog(@"Error: %@", error);
    }];

List the achievements a gamer has for a particular game

NSString *gamerTag = @"theholyboot";
NSNumber *gameId = @"1161890200"; // ID for Fifa13

    [SSXboxLeaders fetchArchievements:gamerTag forTitleId:gameId success:^(NSArray *achievements) {

        // Show achievements array in TextView
        self.achievementTextView.text = [achievements description];
    } failure:^(NSError *error) {
        NSLog(@"Error: %@", error);
    }];

List all friends for a gamer and note how many are online of offline

 NSString *gamerTag = @"theholyboot";

    [SSXboxLeaders fetchFriendsInfo:gamerTag success:^(FriendsInfo *friendsInfo) {
        self.friendsList = friendsInfo.Friends;
        self.totalFriendsLabel.text = [NSString stringWithFormat:@"Total Friends: %@",[friendsInfo.TotalFriends stringValue]];
        self.totalFriendsOnlineLabel.text = [NSString stringWithFormat:@"Total Online Friends: %@",[friendsInfo.TotalOnlineFriends stringValue]];
        self.totalFriendsOfflineLabel.text = [NSString stringWithFormat:@"Total Offline Friends: %@",[friendsInfo.TotalOfflineFriends stringValue]];

        [self.friendsTableView reloadData];
    } failure:^(NSError *error) {
        NSLog(@"Error: %@", error);
    }];

The library is not actively being developed, but send comments or questions to @sandalsoft or [email protected]

Latest podspec

{
    "name": "SSXboxLeaders",
    "platforms": {
        "ios": "5.0"
    },
    "version": "1.1.0",
    "license": "MIT",
    "homepage": "https://github.com/sandalsoft/SSXboxLeaders",
    "authors": {
        "Eric Nelson": "@sandalsoft"
    },
    "summary": "Objective-C Wrapper for XboxLeaders API.",
    "source": {
        "git": "https://github.com/sandalsoft/SSXboxLeaders.git",
        "tag": "1.1.0"
    },
    "source_files": "SSXboxLeaders/*.{h,m}",
    "frameworks": "SystemConfiguration",
    "requires_arc": true,
    "ios": {
        "dependencies": {
            "AFNetworking": []
        }
    }
}

Pin It on Pinterest

Share This