Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-01-12 15:03:53 +00:00
parent 9abf8b4e6a
commit 1a6e2f4cb5
58 changed files with 1018 additions and 1018 deletions

View File

@@ -1,36 +1,9 @@
# Url
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Url/api](https://m3o.com/Url/api).
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/url/api](https://m3o.com/url/api).
Endpoints:
## List
List all the shortened URLs
[https://m3o.com/url/api#List](https://m3o.com/url/api#List)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/url"
)
// List all the shortened URLs
func ListYourShortenedUrls() {
urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN"))
rsp, err := urlService.List(&url.ListRequest{
})
fmt.Println(rsp, err)
}
```
## Shorten
Shorten a long URL
@@ -85,3 +58,30 @@ func ResolveAshortUrlToAlongDestinationUrl() {
}
```
## List
List all the shortened URLs
[https://m3o.com/url/api#List](https://m3o.com/url/api#List)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/url"
)
// List all the shortened URLs
func ListYourShortenedUrls() {
urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN"))
rsp, err := urlService.List(&url.ListRequest{
})
fmt.Println(rsp, err)
}
```