Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-02-21 12:15:24 +00:00
parent c737c0dd9f
commit 92317e7690
23 changed files with 1165 additions and 1165 deletions

View File

@@ -4,6 +4,33 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/url/api](https
Endpoints:
## Shorten
Shorten a long URL
[https://m3o.com/url/api#Shorten](https://m3o.com/url/api#Shorten)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/url"
)
// Shorten a long URL
func ShortenAlongUrl() {
urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN"))
rsp, err := urlService.Shorten(&url.ShortenRequest{
})
fmt.Println(rsp, err)
}
```
## Proxy
Proxy returns the destination URL of a short URL.
@@ -58,30 +85,3 @@ func ListYourShortenedUrls() {
}
```
## Shorten
Shorten a long URL
[https://m3o.com/url/api#Shorten](https://m3o.com/url/api#Shorten)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/url"
)
// Shorten a long URL
func ShortenAlongUrl() {
urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN"))
rsp, err := urlService.Shorten(&url.ShortenRequest{
})
fmt.Println(rsp, err)
}
```