mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-14 20:14:47 +00:00
add notes (#218)
* add notes * fix build * Commit from GitHub Actions (Publish APIs & Clients) Co-authored-by: asim <asim@users.noreply.github.com>
This commit is contained in:
6
examples/notes/delete/curl/deleteANote.sh
Executable file
6
examples/notes/delete/curl/deleteANote.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
curl "https://api.m3o.com/v1/notes/Delete" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
||||
-d '{
|
||||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a"
|
||||
}'
|
||||
16
examples/notes/delete/go/deleteANote.go
Executable file
16
examples/notes/delete/go/deleteANote.go
Executable file
@@ -0,0 +1,16 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Delete a note
|
||||
func DeleteAnote() {
|
||||
notesService := notes.NewNotesService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := notesService.Delete(¬es.DeleteRequest{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
12
examples/notes/delete/node/deleteANote.js
Executable file
12
examples/notes/delete/node/deleteANote.js
Executable file
@@ -0,0 +1,12 @@
|
||||
import * as notes from "m3o/notes";
|
||||
|
||||
// Delete a note
|
||||
async function DeleteAnote() {
|
||||
let notesService = new notes.NotesService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await notesService.delete({
|
||||
id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await DeleteAnote();
|
||||
Reference in New Issue
Block a user