Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pomdtr/deta-space-client

An unofficial client for the Deta Space API.
https://github.com/pomdtr/deta-space-client

Last synced: about 2 months ago
JSON representation

An unofficial client for the Deta Space API.

Awesome Lists containing this project

README

        

# Deta Space Client

An fetch function for deta space

## Usage

See the [Authentication Doc](https://deta.space/docs/en/basics/cli/#authentication) for more information on how to get your access token.

```js
import { fetchFn } from "deta-space-client";

// Provide your access token
const fetchFromSpace = fetchFn(process.env.DETA_SPACE_TOKEN);

fetch("/instances").then((response) => {
console.log(response);
});
```

## CLI

```txt
space-client

Commands:
index.js get Do a GET request
index.js post Do a POST request

Options:
--version Show version number [boolean]
--access-token The space access token [string]
--help Show help [boolean]
```