type Auth struct {
ID string
PW string
Cookies []*http.Cookie // for session
nomember bool // if nomember true, don't login.
transport *http.Transport // for proxy
}
type Article struct {
URL string
Gall string
Number string
}
type Comment struct {
Gall string
Number string
}
auth, err := goinside.Login("ㅇㅇ", "123")
if err != nil {
// login failed
}
// 글 작성 및 삭제
article := auth.WriteArticle("갤러리", "제목", "내용", "이미지1", "이미지2"...)
auth.DeleteArticle(article)
// 댓글 작성 및 삭제
comment := auth.WriteComment("갤러리", "글번호", "내용")
auth.DeleteComment(comment)
// 추천
auth.Recommend(article)
// 비추천
auth.Norecommend(article)
// 자신의 모든 댓글 가져오기 및 삭제
comments := auth.GetComments()
auth.DeleteComments(comments)
// 자신의 모든 글 가져오기 및 삭제
articles := auth.GetArticles()
auth.DeleteArticles(articles)
패키지로 만들어서 주작기 도배기 코드도 깔끔하게 다시짜야겟다
비추 주작기 만들면 기분좋게 쓸수있을거같다