google_groups_crawler

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

README

Google Groups Crawler

Installation

import crawler "github.com/casbin/google-groups-crawler"

Usage

We must get an instance of GoogleGroup first:

group := crawler.NewGoogleGroup("group name")
Get all conversations of the group
  • For some special reasons, you cannot access Google Groups in some area. You can set up a http proxy, and fill the parameter http.Client with it. If you can access Google Groups directly, then you can just fill the parameter like the example code.
  • this function returns an array of GoogleGroupConversation
conversations := group.GetConversations(http.Client{})
Get all messages of the conversation
  • conversation is an instance of GoogleGroupConversation
  • parameter http.Client is the same effect as above
  • this function returns an array of GoogleGroupMessage
messages := conversation.GetAllMessages(http.Client{})

Data Structure

type GoogleGroup struct {
   GroupName string
}

type GoogleGroupConversation struct {
   Author string
   Title string
   Id string
   GroupName string
}

type GoogleGroupMessage struct {
   Author string
   Content string
   Time string
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleGroup

type GoogleGroup struct {
	GroupName string
}

func NewGoogleGroup

func NewGoogleGroup(name string) GoogleGroup

func (GoogleGroup) GetConversations

func (g GoogleGroup) GetConversations(client http.Client) []GoogleGroupConversation

type GoogleGroupConversation

type GoogleGroupConversation struct {
	Author    string
	Title     string
	Id        string
	GroupName string
}

func (GoogleGroupConversation) GetAllMessages

func (c GoogleGroupConversation) GetAllMessages(client http.Client) []GoogleGroupMessage

type GoogleGroupMessage

type GoogleGroupMessage struct {
	Author  string
	Content string
	Time    string
}

Jump to

Keyboard shortcuts

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