Skip to content

About

MistServer Go SDK Rest API

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

58 Commits

Folders and files

Repository files navigation

MistServer Go SDK

CI Go Reference

MistServer is a streaming media server that works well in any streaming environment even on a Raspberry Pi! It bridges the gap between dedicated media servers and web servers, performing the best of both worlds when it comes to media streaming delivery.

Official Rest API Documentation

MistServer-go-sdk is a Go client library for interfacing with the MistServer API. It provides a convenient way to interact with the server and perform operations like creating and managing streams, retrieving server information, and managing access control.

Installation

Use go get to install the library:

go get github.com/Allan-Nava/MistServer-go-sdk

Requires Go 1.25 or newer.

Usage

import (
	"errors"

	mist "github.com/Allan-Nava/MistServer-go-sdk/mist"
	"github.com/go-resty/resty/v2"
	"go.uber.org/zap"
)

logger, _ := zap.NewProduction()

client := mist.NewService(
	resty.New(),     // nil → resty.New()
	logger.Sugar(),  // nil → no-op logger
	mist.WithBaseURL("http://localhost:4242/api"),
	mist.WithUsername("admin"),
	mist.WithPassword("secret"),
)

pushes, err := client.PostPushList(mist.PostPushListRequest{PushList: true})
if errors.Is(err, mist.ErrUnauthorized) {
	// wrong credentials
}

The client performs MistServer's challenge-response login for you and caches it for a minute.

There is a runnable example for every method on pkg.go.dev (source: mist/example_test.go).

API Reference

See pkg.go.dev and the project site.

Contribute

We welcome contributions to this project. If you want to contribute, please fork the repository and submit a pull request with your changes.

Contributors

Allan-Nava
Allan Nava

License

MistServer-go-sdk is licensed under the MIT License. See LICENSE for more information.

About

MistServer Go SDK Rest API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages