GithubHelp home page GithubHelp logo

mauricerkelly / stackkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davedelong/stackkit

1.0 2.0 0.0 2.15 MB

A CoreData-like approach to a StackOverflow api

Home Page: http://stackkit.com

License: Other

C 4.87% Objective-C 95.13%

stackkit's Introduction

#StackKit

StackKit is a Cocoa framework used to interact with the Stack Exchange API (used by Stack Overflow, Super User, Server Fault, Stack Exchange, and related websites).

It is developed by Dave DeLong. Significant contributions (suggestions, enhancements, etc) have been made by Alex Rozanski, Brock Woolf, Can Berk Güder, Tobias Klonk, and Cory Kilger.

##Current Progress

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.

###Mac Use the provided StackKit.xcodeproj file to build StackKit as a framework for inclusion in your Mac application.

###iPhone/iPod touch/iPad Use the provided StackKitMobile.xcodeproj file to build StackKit as a static library for inclusion in your mobile application. You must add -ObjC and -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.

##The future

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.

##Endpoint table

The following conventions are being used in this list:
  • Any predicate attribute that begins with "SK" is implied to be a Key Path.
  • Any predicate with a keypath should be constructed in the following format: @"%K = %@", SKSomeKeyPath, someValue
  • The ## 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).
  • A value inside parenthesis (Example: (tags), (badges), etc) denotes a collection (array) of objects. This collection can be a collection of ID's, names, or objects (as appropriate).
  • Keypaths must always be the left expression of a predicate. While 42 = aProperty is a valid predicate, StackKit would require it to be of the form: aProperty = 42. This may change in the future.
  • The values listed as sort values are to be used as the key of an 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 badges SKBadge (none) (none)
    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:
  • SKQuestionTitle CONTAINS "string"
  • SKQuestionTags CONTAINS (tags)
  • NOT(SKQuestionTags CONTAINS (tags))
  • 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)

    stackkit's People

    Contributors

    davedelong avatar cbguder avatar marksuman avatar mauricerkelly avatar piobyz avatar

    Stargazers

     avatar

    Watchers

     avatar James Cloos avatar

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.