func (c *Client) Put(endpoint string, body interface{}) error {
	logger := c.Logger().WithFields(log.Fields{
		"method":   "Put",
		"endpoint": endpoint,
	})
	buf := &bytes.Buffer{}
	if err := json.NewEncoder(buf).Encode(body); err != nil {
		logger.Debug(err)
		return err
	}
	_, err := c.DoRequest("PUT", endpoint, buf)
	return err
}
Put processes a PUT request.
package internal
import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"strconv"
	"time"
	log "github.com/sirupsen/logrus"
	"github.com/KnutZuidema/golio/api"
)
const (
	apiURLFormat      = "%s://%s.%s%s"
	baseURL           = "api.riotgames.com"
	scheme            = "https"
	apiTokenHeaderKey = "X-Riot-Token"
)
type Client struct {
	L      log.FieldLogger
	Region api.Region
	APIKey string
	Client Doer
}
func NewClient(region api.Region, key string, client Doer, logger log.FieldLogger) *Client {
	return &Client{
		L:      logger,
		Region: region,
		APIKey: key,
		Client: client,
	}
}
func (c *Client) GetInto(endpoint string, target interface{}) error {
	logger := c.Logger().WithFields(log.Fields{
		"method":   "GetInto",
		"endpoint": endpoint,
	})
	response, err := c.Get(endpoint)
	if err != nil {
		logger.Debug(err)
		return err
	}
	if err := json.NewDecoder(response.Body).Decode(target); err != nil {
		logger.Debug(err)
		return err
	}
	return nil
}
func (c *Client) PostInto(endpoint string, body, target interface{}) error {
	logger := c.Logger().WithFields(log.Fields{
		"method":   "PostInto",
		"endpoint": endpoint,
	})
	response, err := c.Post(endpoint, body)
	if err != nil {
		logger.Debug(err)
		return err
	}
	if err := json.NewDecoder(response.Body).Decode(target); err != nil {
		logger.Debug(err)
		return err
	}
	return nil
}