imgur

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: 10 Imported by: 0

Documentation

Overview

Package imgur implements a Service which adds !commands for imgur image search

Index

Constants

View Source
const ServiceType = "imgur"

ServiceType of the Imgur service

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	types.DefaultService
	// The Imgur client ID
	ClientID string `json:"client_id"`
	// The API key to use when making HTTP requests to Imgur.
	ClientSecret string `json:"client_secret"`
}

Service contains the Config fields for the Imgur service.

Example request:

  {
			"client_id": "AIzaSyA4FD39..."
			"client_secret": "ASdsaijwdfASD..."
  }

func (*Service) Commands

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

Commands supported:

!imgur some_search_query_without_quotes

Responds with a suitable image 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