giphy

package
v0.0.0-...-e61e643 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const ServiceType = "giphy"

ServiceType of the Giphy service.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	types.DefaultService
	// The Giphy API key to use when making HTTP requests to Giphy.
	// The public beta API key is "dc6zaTOxFJmzC".
	APIKey string `json:"api_key"`
	// Whether to use the downsized image from Giphy.
	// Uses the original image when set to false.
	// Defaults to false.
	UseDownsized bool `json:"use_downsized"`
}

Service contains the Config fields for the Giphy Service.

Example request:

{
    "api_key": "dc6zaTOxFJmzC",
    "use_downsized": false
}

func (*Service) Commands

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

Commands supported:

!giphy some search query without quotes

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL