Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomascarvalho/shortcut_api
Shortcut (formerly clubhouse) api wrapper for deno.
https://github.com/thomascarvalho/shortcut_api
clubhouse deno shortcut typescript
Last synced: 6 days ago
JSON representation
Shortcut (formerly clubhouse) api wrapper for deno.
- Host: GitHub
- URL: https://github.com/thomascarvalho/shortcut_api
- Owner: thomascarvalho
- Created: 2021-06-02T18:42:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-14T13:21:04.000Z (over 3 years ago)
- Last Synced: 2024-12-27T00:09:34.307Z (14 days ago)
- Topics: clubhouse, deno, shortcut, typescript
- Language: TypeScript
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shortcut_api
[![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Flatest-version%2Fx%2Fshortcut_api%2Fmod.ts)](https://deno.land/x/shortcut_api)
A Shortcut (formerly clubhouse) api wrapper for deno.
## Usage
Import the Shortcut client and initialize it with your token.
```ts
import { Shortcut } from "https://deno.land/x/[email protected]/mod.ts";const client = new Shortcut({ token: "xxx-xxx-xxx" });
```### Via env
Define env var `SHORTCUT_API_TOKEN` with your token.
> :warning: With this method you will have to launch your application with the
> `--allow-env` flag```ts
const client = new Shortcut();
```## Features
From the client all the methods currently accessible (14/09/2021) from the API
v3 are available. https://shortcut.com/api/rest/v3Categories, Entity-Templates, Epic-Workflow, Epics, External-Link, Files,
Groups, Iterations, Labels, Linked-Files, Member, Members, Milestones, Projects,
Repositories, Search, Stories, Story-Links, Workflows## Examples
```ts
// Get all projects
const projects = await client.getProjects();// Add a new story for the first project
const story = await client.createStory({
name: "Fake story",
project_id: projects[0].id,
description: "Fake description",
});const updatedStory = await client.updateStory(story.id, {
description: "Updated fake description",
});await client.deleteStory(/* ... */);
// Get iterations
const iterations = await client.getIterations();
```