Package giphy

import "github.com/matrix-org/go-neb/services/giphy"

Overview ▾

Package giphy implements a Service which adds !commands for Giphy.


const ServiceType = "giphy"

ServiceType of the Giphy service.

type Service

type Service struct {
    // The Giphy API key to use when making HTTP requests to Giphy.
    // The public beta API key is "dc6zaTOxFJmzC".
    APIKey string `json:"api_key"`

Service contains the Config fields for the Giphy Service.

Example request:

    "api_key": "dc6zaTOxFJmzC"

func (*Service) Commands

func (s *Service) Commands(client *matrix.Client) []types.Command

Commands supported:

!giphy some search query without quotes

Responds with a suitable GIF into the same room as the command.