Documentation ¶
Index ¶
- func DeletePage(pageurl string, year int, client *http.Client) error
- func GetFileUrl(file_overview_url string, client *http.Client) (string, error)
- func Login(username, password, loginUrl string) (*http.Client, error)
- func Logout(client *http.Client, logoutUrl string) error
- func QueryPages(prefixURL, teamname, offset string, client *http.Client) ([]string, error)
- func Redirect(client *http.Client, year int, teamname, source, target string) (string, error)
- func Upload(client *http.Client, year int, teamname, pathToFile, offset string, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Login ¶
Login requests the loginURL, which should be a defined constant that leads to the first link in the iGEM login chain. Input : username, password, loginURL. Output: Pointer to Client with active session, if login was successful, otherwise an error will be returned.
func Logout ¶
Logout logs the user out of the iGEM website. logoutURL is the URL to the first page in the logout chain. Input: Pointer to Client, logoutURL. Output: No return value, but an error will be returned if something went wrong.
func QueryPages ¶
TODO: remove hardcoded stuff
func Upload ¶
func Upload(client *http.Client, year int, teamname, pathToFile, offset string, file, force bool) (string, error)
Upload is the wrapper for the whole upload process. Input: Session, Wiki year, Teamname with spaces as underscore, filepath to the file to upload, offset, if it is a file(media files etc.), and if already uploaded files should be overwritten (already uploaded is determined by a hash compare). Output: String containing the URL to the uploaded page / the file overview page, or an error if something went wrong.
Types ¶
This section is empty.