Giter VIP home page Giter VIP logo

scrapes's People

Contributors

natikgadzhi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scrapes's Issues

Add a mocked `modelContext` for previews

KindleAPI now can use stubbed network requests (well, I still have to record them), but for previews, we need proper model context setup, because they won't attempt fetching through the API flow on their own.

This would mean making a little struct that provides a ModelContext and shoves a few books and highlights into it. Makes sense to do after I grab the url request records for unit tests.

Fetch `Highlight` with support for pagination

The current implementation of getHighlights is relies on a very bare bones highlight parser that ignores type, position, page, and does not support pagination.

  • Parse additional fields of a highlight on the model level, including HighlightType enum.
  • Add unit tests for the decoder.
  • Add API pagination support (if the cursor is present, fetch the next page automatically until there is no next page left).

Add models parsing unit tests

Book and Highlight are parsed from html markup with SwiftSoup. Adding a test would make it easier to see if/when the app breaks because of the website markup change.

Also, consider writing a test that tests KindleAPI and supports taping the API response so it can be used in the tests later.

  • Highlight tests should be covered in #3
  • Add Book decoder unit tests.

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.