mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-15 12:14:43 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -4,6 +4,33 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Notes/api](htt
|
||||
|
||||
Endpoints:
|
||||
|
||||
## Subscribe
|
||||
|
||||
Specify the note to events
|
||||
|
||||
|
||||
[https://m3o.com/notes/api#Subscribe](https://m3o.com/notes/api#Subscribe)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/notes"
|
||||
)
|
||||
|
||||
// Specify the note to events
|
||||
func SubscribeToEvents() {
|
||||
notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := notesService.Subscribe(¬es.SubscribeRequest{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
```
|
||||
## Create
|
||||
|
||||
Create a new note
|
||||
@@ -143,30 +170,3 @@ func DeleteAnote() {
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
```
|
||||
## Subscribe
|
||||
|
||||
Specify the note to events
|
||||
|
||||
|
||||
[https://m3o.com/notes/api#Subscribe](https://m3o.com/notes/api#Subscribe)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/notes"
|
||||
)
|
||||
|
||||
// Specify the note to events
|
||||
func SubscribeToEvents() {
|
||||
notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := notesService.Subscribe(¬es.SubscribeRequest{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user