CLI client for Syncthing in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
256B

  1. package api
  2. import (
  3. "git.dtluna.net/dtluna/syncthing-cli/config"
  4. "gopkg.in/h2non/gentleman.v2"
  5. )
  6. func NewClient(cfg *config.Config) *gentleman.Client {
  7. return gentleman.New().
  8. BaseURL("http://"+cfg.Address).
  9. AddHeader("X-API-KEY", cfg.APIKey)
  10. }