0.1.0 ā€¢ Published 1 year ago

cizo v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

REST API Integration made easy

šŸ  Homepage

Install

npm install cizo

Ideology

This library aims to simplify how client side applications interects with backend REST APIs. Cizo uses object oriented approach to interect with REST API.

Quick Start

server-side

On the Server side you will have to open a public end-point at /_cizo-schema (however, you can custumize this on client-side). This open endpoint should send JSON Schema something like this:

{
    "version": "0.1.0",
    "endpoints": [
        {
            "path": "/hello-world",
            "name": "HelloWorld",
            "methods": "any"
        },
        {
            "path": "/other",
            "name": "other",
            "methods": ["GET", "POST"]
        }
    ]
}

client-side

import CizoClient from 'cizo';

const cizo = new CizoClient({ host: 'http://localhost:3000', // default endpoint: '/_cizo-schema' // default })

await cizo.init() // this is required to fetch schema

// Performing a query cizo.get('HelloWorld').then(console.log).catch((error)=>{ console.error("Error", error) })

## Author

šŸ‘¤ **Henil Malaviya**

* E-mail: [me@henil.xyz](mailto:me@henil.xyz)
* Website: [henil.xyz](https://henil.xyz)
* Twitter: [@realhenil](https://twitter.com/realhenil)
* Github: [@henil0604](https://github.com/henil0604)

## šŸ¤ Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/henil0604/filic/issues). 

## Show your support

Give a ā­ļø if this project helped you!
0.1.0

1 year ago