SSXboxLeaders 1.1.0

SSXboxLeaders 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total7
Week0
Month0

Installs

Apps1
powered by Segment

GitHub

Stars3
Watchers2
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files12
LOCLines of Code 327


  • By
  • Eric Nelson

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 no minimal checking or 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 still actively being developed. Comments or questions go to @sandalsoft.