Interacting with APIs
Netzo provides a simple and intuitive way to interact with APIs. It allows you to create a client for an existing API or a custom API and provides a convenient way to make requests to the API.
Netzo provides a simple and intuitive way to interact with APIs. It allows you to create a client for an existing API or a custom API and provides a convenient way to make requests to the API.
The following basic examples show how to work with APIs.
Creat an API client
An example of connecting to an existing API, in this case the JSONPlaceholder API.
import { jsonplaceholder } from 'netzo/apis/jsonplaceholder/mod.ts'const { api } = jsonplaceholder()const users = await api.users.get()
You can visit the apis
page to see a list of all the APIs that are currently supported.
Create a custom API client
An example of connecting to a custom API, in this case the JSONPlaceholder API.
import { rest } from 'netzo/apis/rest/mod.ts'const api = rest({ baseURL: 'https://jsonplaceholder.typicode.com', headers: { 'content-type': 'application/json' }})const data = await api.sales.get({ start: Date.now() })
WebAssembly
WebAssembly (abbreviated WASM) is a binary instruction format for the web. It is designed to be a portable target for compilation of higher-level programming languages like C, C++, Rust, Go, Python, AssemblyScript and more, enabling deployment on the web for client and server applications.
Apps dashboard
Netzo's Apps dashboard module shows all projects shared with you across all your Workspaces