mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-16 13:04:34 +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:
4
examples/notes/list/curl/listAllNotes.sh
Executable file
4
examples/notes/list/curl/listAllNotes.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
curl "https://api.m3o.com/v1/notes/List" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
||||
-d '{}'
|
||||
14
examples/notes/list/go/listAllNotes.go
Executable file
14
examples/notes/list/go/listAllNotes.go
Executable file
@@ -0,0 +1,14 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
)
|
||||
|
||||
// List all the notes
|
||||
func ListAllNotes() {
|
||||
notesService := notes.NewNotesService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := notesService.List(¬es.ListRequest{})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
10
examples/notes/list/node/listAllNotes.js
Executable file
10
examples/notes/list/node/listAllNotes.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import * as notes from "m3o/notes";
|
||||
|
||||
// List all the notes
|
||||
async function ListAllNotes() {
|
||||
let notesService = new notes.NotesService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await notesService.list({});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await ListAllNotes();
|
||||
Reference in New Issue
Block a user