service

package
v0.0.0-...-87d79fb Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package service provides an implemenation of the twitter service defined under package proto.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a grpc complient server as defined in /proto.

func NewTwitterServer

func NewTwitterServer(httpClient *http.Client) *Server

NewTwitterServer creates a new grpc complient server as defined in /proto.

func (*Server) SearchTweets

func (s *Server) SearchTweets(ctx context.Context, args *pb.SearchTweetsArgs) (*pb.SearchTweetsRet, error)

SearchTweets queries the Twitter REST API.

func (*Server) StreamTweets

func (s *Server) StreamTweets(args *pb.StreamTweetsArgs, stream pb.Twitter_StreamTweetsServer) error

StreamTweets queries the Twitter STREAM API.

type TwitterError

type TwitterError struct {
	Errors []apierror `json:"errors"`
}

TwitterError represents a Twitter API Error response. https://dev.twitter.com/overview/api/response-codes

func (TwitterError) Error

func (e TwitterError) Error() string

Directories

Path Synopsis
context
Package stream wraps connections to the Twitter STREAM API to simplify access.
Package stream wraps connections to the Twitter STREAM API to simplify access.

Jump to

Keyboard shortcuts

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