LXBoardGameGeek is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "LXBoardGameGeek"
SoonTM
To run the example project, clone the repo, and run pod install
from the Example directory first.
LXBoardGameGeek
is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call [LXBoardGameGeek method]
).
Quick example that returns all boardgames that matches "Settlers of catan":
NSArray *options = @[kBGGOptionTypeBoardGame];
[LXBoardGameGeek search:@"Settlers of Catan" options:options completion:^(NSArray *games, NSError *error) {
if (!error) {
//Do something with games
}
}];
###Available endpoints:
+ (void)gameWithID:(int)gameID options:(NSArray *)options completion:(boardGameCompletionBlock)completion;
+ (void)search:(NSString *)name options:(NSArray *)options completion:(boardGamesCompletionBlock)completion;
+ (void)gamesFromArray:(NSArray *)gameIDs options:(NSArray *)options completion:(boardGamesCompletionBlock)completion;
+ (void)gamesFromString:(NSString *)gameIDs options:(NSArray *)options completion:(boardGamesCompletionBlock)completion;
#####Options Every call takes an NSArray with kBGGOptions. These are available right now: ######Search:
kBGGOptionTypeBoardGame
(Return boardgames only)kBGGOptionTypeExpansion
(Return boardgameexpansions only)kBGGOptionSearchExact
(Match name exactly)
######gameWithID:
- kBGGOptionShowStats (Also fetch statistics)
#####LXBoardGame
LXBoardGame is the primary model returned by most methods. See LXBoardGame.h
for all available properties.
LXBoardGameGeek is using XMLDictionary by Nick Lockwood which is included as a CocoaPod.
I would love to receive feedback on this project. Send a PR or shoot me an email.
LXBoardGameGeek is available under the MIT license. See the LICENSE file for more info.