Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-10-31 13:53:09 +00:00
parent 5c6ed49281
commit c64b4b029f
15 changed files with 648 additions and 648 deletions

View File

@@ -4,32 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Url/api](https
Endpoints:
## Shorten
Shortens a destination URL and returns a full short URL.
[https://m3o.com/url/api#Shorten](https://m3o.com/url/api#Shorten)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/url"
)
// Shortens a destination URL and returns a full short 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.
@@ -82,3 +56,29 @@ func ListYourShortenedUrls() {
fmt.Println(rsp, err)
}
```
## Shorten
Shortens a destination URL and returns a full short URL.
[https://m3o.com/url/api#Shorten](https://m3o.com/url/api#Shorten)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/url"
)
// Shortens a destination URL and returns a full short URL.
func ShortenAlongUrl() {
urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN"))
rsp, err := urlService.Shorten(&url.ShortenRequest{
})
fmt.Println(rsp, err)
}
```