Skip to content

ZackStone/rest-api-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest-api-fetcher

Usage example:

var rest_api_fetcher = require('rest-api-fetcher')

var codejquery = rest_api_fetcher.createRoute('http://code.jquery.com', ['jquery-3.3.1.js'])
codejquery.get()

var routes = [
    'posts',
    'comments'
]

var api = rest_api_fetcher.createRoutes('https://jsonplaceholder.typicode.com', routes)

// .get(id, subroute, query)

api.posts.get()
api.comments.get()

api.posts.get(1)
api.posts.get(1, 'comments')

api.comments.get(null, null, { postId: 1 })

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published