About 85% of the API is implemented. Chances are it will work, but if it doesn't, please file a bug!
Using the API
This framework can be used with Mac OS and iPhone OS applications.
Use the provided
StackKit.xcodeproj file to build StackKit as a framework for inclusion in your Mac application.
Use the provided
StackKitMobile.xcodeproj file to build StackKit as a static library for inclusion in your mobile application. You must add
-all_load to your Other Linker Flags section of your build settings. This ensures that the Categories in StackKit will be loaded with the static library.
Running the unit tests
Change the target to "Unit Tests" and then choose "Build and Run". The StackKit project is set up to only run the tests from the executable (so that they can be debugged), and not during compilation.
As the API is released and updated by the Stack Overflow team, we will be able to provide an underlying StackKit implementation for such features.
The following conventions are being used in this list: Endpoint table
@"%K = %@", SKSomeKeyPath, someValue
##symbol can be either a string, a number, or an object of the appropriate type. If the keypath is asking (for example) for a tag, the value can be either the tag's name or an SKTag object. In many cases, you may also pass an array or set of objects of the appropriate type in order to "OR" them together. For example, this predicate will request all questions created either one of the two users:
SKQuestionOwner = (123, 456)(where
(123, 456)is an array or set).
(badges), etc) denotes a collection (array) of objects. This collection can be a collection of ID's, names, or objects (as appropriate).
42 = aPropertyis a valid predicate, StackKit would require it to be of the form:
aProperty = 42. This may change in the future.
NSSortDescriptor. For example:
NSSortDescriptor * sortByName = [[NSSortDescriptor alloc] initWithKey:SKUserDisplayName ascending:YES];
|If you want...||Use this fetch entity:||And this predicate:||And you can sort it by (one of):|
|A specific answer||SKAnswer||SKAnswerID = ##||(none)|
|The answers for a specific question||SKAnswer||SKQuestionID = ##||SKAnswerLastActivityDate, SKAnswerViewCount, SKAnswerCreationDate, SKAnswerScore|
|A specific user's answers||SKAnswer||SKAnswerOwner = ##||SKAnswerLastActivityDate, SKAnswerViewCount, SKAnswerCreationDate, SKAnswerScore|
|All non-tag-based badges||SKBadge||SKBadgeTagBased = NO||(none)|
|All tag-based badges||SKBadge||SKBadgeTagBased = YES||(none)|
|A specific user's badges||SKBadge||SKBadgesAwardedToUser = ##||(none)|
|All users that have been awarded a specific badge||SKUser||SKUserBadges CONTAINS (badges)||(none)|
|A specific comment||SKComment||SKCommentID = ##||(none)|
|A specific user's comments||SKComment||SKCommentOwner = ##||SKCommentCreationDate, SKCommentScore|
|All comments from one user in reply to another user||SKComment||SKCommentOwner = ## AND SKCommentInReplyToUser = ##||SKCommentCreationDate, SKCommentScore|
|All comments where a specific user is mentioned||SKComment||SKCommentInReplyToUser = ##||SKCommentCreationDate, SKCommentScore|
|All comments for a post (a question or an answer)||SKComment||SKPostID = ##||SKCommentCreationDate, SKCommentScore|
|A list of questions||SKQuestion||(none)||SKQuestionCreationDate, SKQuestionScore|
|A specific question||SKQuestion||SKQuestionID = ##||(none)|
|Questions that are tagged with certain tags||SKQuestion||SKQuestionTags CONTAINS (tags)||SKQuestionCreationDate, SKQuestionScore|
|Unanswerd questions||SKQuestion||SKQuestionAnswerCount = 0||SKQuestionCreationDate, SKQuestionScore|
|Favorited questions of a specific user||SKQuestion||SKFavoritedByUser = ##||SKQuestionLastActivityDate, SKQuestionViewCount, SKQuestionCreationDate, SKQuestionScore, SKQuestionFavoritedDate|
|Questions asked by a specific user||SKQuestion||SKQuestionOwner = ##||SKQuestionLastActivityDate, SKQuestionViewCount, SKQuestionCreationDate, SKQuestionScore|
|A list of all tags||SKTag||(none)||SKTagNumberOfTaggedQuestions, SKTagLastUsedDate, SKTagName|
|A list of tags in which a specific user has participated||SKTag||SKTagsParticipatedInByUser = ##||SKTagNumberOfTaggedQuestions, SKTagLastUsedDate, SKTagName|
|A list of tags with a particular string in the name||SKTag||SKTagName CONTAINS "string"||SKTagNumberOfTaggedQuestions, SKTagLastUsedDate, SKTagName|
|A list of users||SKUser||(none)||SKUserReputation, SKUserCreationDate, SKUserDisplayName|
|To search for users by their name||SKUser||SKUserDisplayName CONTAINS "string"||SKUserReputation, SKUserCreationDate, SKUserDisplayName|
|A specific user||SKUser||SKUserID = ##||(none)|
|A list of recent activity for a specific user||SKUserActivity||SKUserID = ##||(none)|
|To search for questions by their title or tags||SKQuestion||One of:
||SKQuestionLastActivityDate, SKQuestionViewCount, SKQuestionCreationDate, SKQuestionScore|
|The activity on a specific question||(not yet implemented)||(not yet implemented)||(not yet implemented)|
|A list of revisions for a question or answer||(not yet implemented)||(not yet implemented)||(not yet implemented)|
|A specific revision||(not yet implemented)||(not yet implemented)||(not yet implemented)|
|A list of reputation changes for a specific user||(not yet implemented)||(not yet implemented)||(not yet implemented)|