Code Monkey home page Code Monkey logo

objects-http-api's Introduction

API

My main problem with APIs I usualy meet:

Getting all the nested information I want usualy require to make multiple requests, possibly in nested loops. (Get object1, get all objects in relation with that one, then ask for each objects in relation to those objects, ...)

Even if each request in fairly fast, the number of increasing requests tend to end with a high delay to gather all information. One easier way would be to do a single request per object type to the end backend (ie: one request per table for mysql backend)

To avoid having to maintain alot of different function, I tend to prefer generic functions, even if some special cases might imply specific codes here and there.

Those documents present a idea of API. Any comment about it would be appreciated.

types.json

Describe how the different known types will be presented.

Listing and describing the objects we are able to handle seems like a nice thing to do, especialy for auto-discovery and generic applications.

search.json

Describe a search request.

A search request will be able to:

  • Filter what objects we want to find
  • List exactly what fields and netsted fields we are interested in

Nesting results would allow to get everything we need from that point without needing to loop on result and ask more information on each objects because of lack of information.

update.json

Describe a modification request.

Creating, Updating and/or Deleting objects might be an "atomic" operation. That api allow to find a few objects and ask multiple operations at once, with objects refering each others.

objects-http-api's People

Contributors

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