kahnvex / endpoints Goto Github PK
View Code? Open in Web Editor NEWSimple Javascript helper library for HTTP service clients
Home Page: https://www.npmjs.org/package/endpointsjs
License: MIT License
Simple Javascript helper library for HTTP service clients
Home Page: https://www.npmjs.org/package/endpointsjs
License: MIT License
This will allow for easily adding methods that can be applied at three levels:
GET
requests originating from an endpoint)GET
request from an endpoint)Use JSDOX for documenting API.
Needs a watch task that is fast and reliable.
Instead of returning the endpoint after a call to the server, it is better to return a manager that can permute the endpoint, based on the response and the user's needs.
var callback = function(manager) {
manager.updateEndpoint();
console.log(manager.getResponse())
console.log(manager.getEndpoint());
};
var myEndpoint = Endpoints.create('/')
.methods(['get']);
myEndpoint.get
.send()
.then(callback)
Endpoint and method objects should not have to directly access eachother's properties. Http method helper can be used to decouple the two implementations, passing the method all details it needs, instead of the whole endpoint.
This will also allow thenApply
to be implemented on a method, but before method creation, so doing: Endpoint.method.thenApply
would be possible, instead of the one off Endpoint.method().thenApply
.
Add endpoint implementation for basic endpoint patterns such as:
Collection: list and create ['GET', 'POST']
Resource: read, update, delete ['GET', 'PUT', 'DELETE']
Each endpoint pattern should have a data property at the same level as its methods. This attribute should be set to the value of the return object, and used, but default, as the source of data when POSTing or PUTing to the server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.