Giter Club home page Giter Club logo

hackerswifter's Introduction

HackerSwifter

A Swift Hacker News library for iOS and OSX

Goal

We want to make a new shiny and powerful library for scrapping Hacker News. Kinda like LibHN do in Objective-c. But HackerSwifter will add a lot of other features.

Limitation

As you know, Hacker News does not provide any official API, so we rely on scrapping the HTML pages in order to convert them into Swift object. This is the only solution at the moment, so things may broke and may not be future proof.

But hey, the goal is to have a nice and clean library you can plug in your Swift projects.

Features

  • Fetch the different feed pages (news, jobs, ask...)
  • Upvote post
  • Login
  • Fetch users page
  • Fetch comments
  • Post comments
  • Vote comments
  • HN Logic (500 karma comments vote etc...)
  • Provide a clear user facing error message
  • Caching mechanism for offline use
  • Full Swift
  • Less code possible
  • Offer a very clear and consise API
  • Easily manageable
  • Inteligent scrapping?

Tech

We will use NSURLSession and no fancy external library.

Each models (Post, User, etc...) will directly expose class method to load itself or a list of itself, exemple.

Post.Load(.News, completionClosure([Post]: posts)) User.load("username", completionClosure(User: user))

So no webservice or manager exposed, everything is done at the model level.

More to come...

hackerswifter's People

Contributors

dimillian avatar finder39 avatar

Watchers

 avatar  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.