Serve a file
client.Assets.Serve(ctx, query) (*Response, error)
GET/v1/assets/serve
Stream a file given an mxc://, localmxc://, or file:// URL. Downloads first if not cached. Supports Range requests for seeking in large files.
Serve a file
package main
import (
"context"
"fmt"
"github.com/beeper/desktop-api-go"
"github.com/beeper/desktop-api-go/option"
)
func main() {
client := beeperdesktopapi.NewClient(
option.WithAccessToken("My Access Token"),
)
response, err := client.Assets.Serve(context.TODO(), beeperdesktopapi.AssetServeParams{
URL: "x",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}