Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethiomarketplace/product-highlight
Template Creator API for EMP posts
https://github.com/ethiomarketplace/product-highlight
api-rest image-generation marketplace nextjs supabase sveltejs template
Last synced: 4 days ago
JSON representation
Template Creator API for EMP posts
- Host: GitHub
- URL: https://github.com/ethiomarketplace/product-highlight
- Owner: EthioMarketPlace
- Created: 2023-11-24T19:49:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-29T13:36:02.000Z (about 1 year ago)
- Last Synced: 2024-12-21T17:15:46.781Z (4 days ago)
- Topics: api-rest, image-generation, marketplace, nextjs, supabase, sveltejs, template
- Language: TypeScript
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# product highlight
This api is used to create highlight for products
## Create Highlight
### Request
```js
const axios = require("axios");
let data = JSON.stringify({
title: "catt",
description: "this",
imgUrl:
"https://t4.ftcdn.net/jpg/02/66/72/41/360_F_266724172_Iy8gdKgMa7XmrhYYxLCxyhx6J7070Pr8.jpg",
});let config = {
method: "post",
url: "https://udizfftsmcgvomltkxyr.supabase.co/functions/v1/highlights",
headers: {
"Content-Type": "application/json",
},
data: data,
};axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
```### Response
{ "imgUrl":"https://udizfftsmcgvomltkxyr.supabase.co/storage/v1/object/public/images/product-images/uuid.png", title: "uuid"}
## Delete Highlight
### Request
```js
const axios = require("axios");let config = {
method: "get",
url: "https://udizfftsmcgvomltkxyr.supabase.co/functions/v1/delete-highlight?title=uuid",
};axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
```### Response
{ "status":"deleted" }