mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -4,64 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/lists/api](htt
|
||||
|
||||
Endpoints:
|
||||
|
||||
## Update
|
||||
|
||||
Update a list
|
||||
|
||||
|
||||
[https://m3o.com/lists/api#Update](https://m3o.com/lists/api#Update)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/lists"
|
||||
)
|
||||
|
||||
// Update a list
|
||||
func UpdateAlist() {
|
||||
listsService := lists.NewListsService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := listsService.Update(&lists.UpdateRequest{
|
||||
List: &lists.List{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
},
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
## Delete
|
||||
|
||||
Delete a list
|
||||
|
||||
|
||||
[https://m3o.com/lists/api#Delete](https://m3o.com/lists/api#Delete)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/lists"
|
||||
)
|
||||
|
||||
// Delete a list
|
||||
func DeleteAlist() {
|
||||
listsService := lists.NewListsService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := listsService.Delete(&lists.DeleteRequest{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
## Events
|
||||
|
||||
Subscribe to lists events
|
||||
@@ -185,3 +127,61 @@ func ListAllLists() {
|
||||
|
||||
}
|
||||
```
|
||||
## Update
|
||||
|
||||
Update a list
|
||||
|
||||
|
||||
[https://m3o.com/lists/api#Update](https://m3o.com/lists/api#Update)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/lists"
|
||||
)
|
||||
|
||||
// Update a list
|
||||
func UpdateAlist() {
|
||||
listsService := lists.NewListsService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := listsService.Update(&lists.UpdateRequest{
|
||||
List: &lists.List{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
},
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
## Delete
|
||||
|
||||
Delete a list
|
||||
|
||||
|
||||
[https://m3o.com/lists/api#Delete](https://m3o.com/lists/api#Delete)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/lists"
|
||||
)
|
||||
|
||||
// Delete a list
|
||||
func DeleteAlist() {
|
||||
listsService := lists.NewListsService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := listsService.Delete(&lists.DeleteRequest{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user