jwc

package
v0.0.0-...-23f3ce9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ggtz
	GGTZ_URL = "https://www.lit.edu.cn/jwc/xb2021/ggtz.htm"
	// gttz by page
	GGTZ_PAGE_URL = "https://www.lit.edu.cn/jwc/xb2021"
	// post url
	POST_URL = "https://www.lit.edu.cn/jwc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Url  string `json:"url"`
	Name string `json:"name"`
}

type JwCUser

type JwCUser struct {
	Client *resty.Client
}

JwUser 教务在线结构体

func NewJwCUser

func NewJwCUser() *JwCUser

NewJwUser 新建教务用户

func (*JwCUser) GetGGTZPost

func (u *JwCUser) GetGGTZPost(postPath string) (content PostContent, err error)

func (*JwCUser) GetGGTZPostList

func (u *JwCUser) GetGGTZPostList(nextPath string) (list PostList, err error)

获取公告通知

type Post

type Post struct {
	Title string `json:"title"`
	Url   string `json:"url"`
	Date  string `json:"date"`
}

type PostContent

type PostContent struct {
	Content    string       `json:"content"`
	Attachment []Attachment `json:"attachment"`
}

type PostList

type PostList struct {
	Posts []Post `json:"posts"`
	Next  string `json:"next"`
}

Jump to

Keyboard shortcuts

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