Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-02 14:06:57 +00:00
parent 1b52b0f771
commit c5f35e9f42
20 changed files with 745 additions and 745 deletions

View File

@@ -4,6 +4,32 @@ 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.
@@ -56,29 +82,3 @@ 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)
}
```