Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLogin = errors.New("ErrLogin")
View Source
var FIRST_RUN = ""
View Source
var MAP_MW_ERROR_WARNING = map[UploadWarning]string{ UPLOAD_WARNING_SAME_FILE_NO_CHANGE: "fileexists-no-change", }
Functions ¶
func NewStateForGetAllPages ¶
Types ¶
type ApiCredentials ¶
type ApiCredentials struct { CsrfToken *CsrfToken LoginResult *LoginResult }
func GetApiCredentials ¶
func GetApiCredentials(config *Config, hook *HookOptions) (*ApiCredentials, error)
type EditResult ¶
type EditResult struct {
Success bool
}
func Edit ¶
func Edit( config *Config, credentials *ApiCredentials, title string, content string, summary string, hook *HookOptions, ) (*EditResult, error)
type HookOptions ¶
type Image ¶
func GetAllImages ¶
func GetAllImages(config *Config, credentials *ApiCredentials, continuation string, hook *HookOptions) ([]Image, string, bool, error)
type LoginResult ¶
type LoginResult struct {
Cookie string
}
type LoginTokenSet ¶
type Page ¶
func GetAllPages ¶
func GetAllPages( config *Config, credentials *ApiCredentials, stateSerialized map[string]string, hook *HookOptions) ([]Page, map[string]string, bool, error)
func GetPage ¶
func GetPage(config *Config, credentials *ApiCredentials, title string, hook *HookOptions) (*Page, error)
type StateGetAllPages ¶
type UploadResult ¶
type UploadResult struct {
Success bool
}
type UploadWarning ¶
type UploadWarning int
const ( UPLOAD_WARNING_NONE UploadWarning = iota UPLOAD_WARNING_SAME_FILE_NO_CHANGE = iota )
func Upload ¶
func Upload(config *Config, credentials *ApiCredentials, fileName string, fileContent io.Reader) (error, []UploadWarning, bool)
Click to show internal directories.
Click to hide internal directories.