Skip to content

Commit 500e3d9

Browse files
committed
Update README
1 parent 2726628 commit 500e3d9

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Introduction
2+
A [Directus](https://github.com/directus/directus) interface extension for triggering API calls from the UI.
3+
4+
- **Support common HTTP methods**. GET, POST, PUT, PATCH, DELETE.
5+
- **API calls are authenticated automatically**.
6+
- **Dynamic URL**. Use [micromustache](https://github.com/userpixel/micromustache) to generate dynamic URL based on the current values of the item.
7+
- **Disable trigger based on the current values of the item**.
8+
9+
![](./screenshots/screenshot1.jpeg)
10+
11+
# Installation
12+
```
13+
npm i directus-extension-api-trigger-interface
14+
```
15+
16+
# Get Started
17+
1. Go to **Settings**, create a new field with type alias.
18+
2. In the **Interface** panel, choose **API Trigger** interface. There are 2 options:
19+
1. **Layout**: Display the button list vertically or horizontally.
20+
2. **Triggers**: A list of trigger.
21+
1. **Label**: label of the button
22+
2. **Size**: size of the button
23+
3. **Type**: style of the button
24+
4. **Icon**: icon of the button
25+
5. **URL**: API endpoint
26+
6. **Method**: Method of the API call
27+
7. **Reload**: If enabled, reload the browser if call succeeded
28+
8. **Disabled Conditions**: disable the button if the conditions are met.
29+
30+
# Limitation
31+
- Only works for same domain APIs.
32+
33+
# TODO
34+
- Allow to disable authentication.
35+
- Call external APIs.
36+
- Reduce budnle size.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "directus-extension-api-trigger-interface",
33
"version": "1.0.0",
4-
"description": "Display a button to trigger custom APIs",
4+
"description": "Trigger API calls from the UI",
55
"author": {
66
"email": "[email protected]",
77
"name": "Vũ Đức Duy"

screenshots/screenshot1.jpeg

45.8 KB
Loading

0 commit comments

Comments
 (0)