Giter Club home page Giter Club logo

fortune-client's People

Contributors

alexgola avatar alexgolafv avatar bbraithwaite avatar craigedmunds avatar dmskr avatar eugenekostrikov avatar hingsta avatar hithisisneel avatar iliazubkov avatar jesuscript avatar kabaros avatar leesio avatar mjtodd avatar roman-vasilyev avatar wronaa89 avatar yelisaveta avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fortune-client's Issues

Create a fluent interface for fortune client

Support a fluent interface on fortune client, that allows us to, for example query with:

fortuneClient.users.get({ name : "Craig" }).fields(["name", "id"]).sort({ name : -1 }).page(1).pageSize(10)

Or maybe

fortuneClient.getUsers({ name : "Craig" }).fields(["name", "id"]).sort({ name : -1 }).page(1).pageSize(10)

Should we keep the existing interface too?

Provide an easier to use API in fortune-client that "de-normalises" linked resources.

The fortune API returns linked resources in a seperate array, to remove duplication, minimising the data transferred on the wire.

I.e. Given the example https://github.com/flyvictor/fortune/blob/master/examples/relationships.js, a GET /users?include=addresses request would get a response like:

{ "users" : [{ "name" : "craig", links : { "addresses" : [ "1"] } }]
  "linked" : {
    "addresses" : [ { id : "1" ... } ]
  }
}

This normalised form is great for transfer, but more difficult for a client app to process.

Fortune client should make this easier for client apps by de-normalising the data before providing it to the client app.

Recursive denormalization

The current implementation is not recursive. We should add a new one (but keep the old one for backwards compatability).

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.