go_trend_slack_bot

package
v0.0.0-...-be5d78e Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: MIT Imports: 6 Imported by: 0

README

Slack Google Hot trend stories push bot on GAE Example

Install and set up

go get -u github.com/tacogips/google_trend_go/example/go_trend_slack_bot

this example work on google app engine standard on go1.8.

check google app engine tutorial

Basic Usage

All you need to edit is env_variables section in app/app.yaml

  1. Create your own Slack Bot user and API Token

  2. Write Slack token to SLACK_TOKEN in app/app.yaml

  3. Create channel(s) to push "hot trend" and "newest stories" (it's can be a single channel ). Then Invite Bot User to the channels.

  4. Write channel names to HOT_TREND_CHANNEL and STORIES_CHANNEL in app/app.yaml

  5. make serve to work on local app engine . make deploy to deploy.

Change Geolocation ,Language and Timezone

Geo, Language, and timezone to pass to google trend api set as Japanese(Asia/Tokyo). To change geo and timezone in hot-trend.go stories.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PushHotTrends

func PushHotTrends(httpClient *http.Client, apiKey string, channel string) error

func PushStories

func PushStories(httpClient *http.Client, apiKey string, channel string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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