mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 02:45:11 +00:00
63 lines
930 B
Markdown
Executable File
63 lines
930 B
Markdown
Executable File
# App
|
|
|
|
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/App/api](https://m3o.com/App/api).
|
|
|
|
Endpoints:
|
|
|
|
## Vote
|
|
|
|
Vote to have the App api launched faster!
|
|
|
|
|
|
[https://m3o.com/app/api#Vote](https://m3o.com/app/api#Vote)
|
|
|
|
```go
|
|
package example
|
|
|
|
import(
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/app"
|
|
)
|
|
|
|
// Vote to have the App api launched faster!
|
|
func VoteForTheApi() {
|
|
appService := app.NewAppService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := appService.Vote(&app.VoteRequest{
|
|
Message: "Launch it!",
|
|
|
|
})
|
|
fmt.Println(rsp, err)
|
|
|
|
}
|
|
```
|
|
## Reserve
|
|
|
|
Reserve your app name
|
|
|
|
|
|
[https://m3o.com/app/api#Reserve](https://m3o.com/app/api#Reserve)
|
|
|
|
```go
|
|
package example
|
|
|
|
import(
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/app"
|
|
)
|
|
|
|
// Reserve your app name
|
|
func ReserveAppName() {
|
|
appService := app.NewAppService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := appService.Reserve(&app.ReserveRequest{
|
|
Name: "helloworld",
|
|
|
|
})
|
|
fmt.Println(rsp, err)
|
|
|
|
}
|
|
```
|