Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessProblemSource ¶
function to clean out some of the BS people perform on C&P titles
func ProcessTags ¶
func RemoveHtmlBS ¶
Helper function that eliminates completely useless HTML tags in titles and whatnot.
Types ¶
type CategoryResponse ¶
type CategoryResponse struct { Response struct { Category *struct { CategoryId int `json:"category_id"` Name string `json:"category_name"` Items []Post `json:"items"` } `json:"category"` } `json:"response"` }
func (*CategoryResponse) ToProblems ¶
func (resp *CategoryResponse) ToProblems(f *ForumSession) []Problem
type ContestList ¶
key is general category (e.g. olympiad, USA contests, etc)
type ErrorResponse ¶
type ForumSession ¶
type ForumSession struct { SessionId string `json:"id"` UserId int `json:"user_id"` Username string `json:"username"` LoggedIn bool `json:"logged_in"` Role string `json:"role"` Sid string `json:",omitempty"` }
func InitForumSession ¶
func InitForumSession() ForumSession
func (*ForumSession) GetCategoryItems ¶
func (f *ForumSession) GetCategoryItems(id int) (*CategoryResponse, error)
func (*ForumSession) GetTopic ¶
func (f *ForumSession) GetTopic(id int) (*TopicResponse, error)
func (*ForumSession) InitRequest ¶
func (f *ForumSession) InitRequest(body_input url.Values) *http.Request
func (*ForumSession) ScrapeForumList ¶
func (session *ForumSession) ScrapeForumList(contests []int) []Problem
type Meta ¶
type Meta struct { Contests ContestList `json:"contestlist"` ProblemCount int `json:"problemcount"` Date time.Time `json:"date"` }
type Post ¶
type Post struct { PostId int `json:"item_id"` Title string `json:"item_text"` Type string `json:"item_type"` PostData struct { TopicId int `json:"topic_id"` PostId int `json:"post_id"` CategoryId int `json:"category_id"` Rendered string `json:"post_rendered"` Canonical string `json:"post_canonical"` } `json:"post_data"` }
type ScrapeResult ¶
func ScrapeForumCategories ¶
func ScrapeForumCategories(contestlist ContestList) ScrapeResult
type TopicResponse ¶
Click to show internal directories.
Click to hide internal directories.