Image Uploader Scripting API
Functions
implement.h File Reference

Functions

int CreateFolder (CFolderItem parent, CFolderItem folder)
 
int DoLogout ()
 
array GetFolderAccessTypeList ()
 
int GetFolderList (CFolderList folderList)
 
table GetServerParamList ()
 
int IsAuthenticated ()
 
int ModifyFolder (CFolderItem folder)
 
int ShortenUrl (string url, UploadParams params)
 
int UploadFile (string pathToFile, UploadParams params)
 

Detailed Description

Functions to implement

You have to implement at least one function — UploadFile.
If you want to support album listing/creating/modifying, you have to implement also GetFolderList, CreateFolder, ModifyFolder, GetFolderAccessTypeList.

Function Documentation

◆ DoLogout()

int DoLogout ( )
Returns
1 - success,
0 - fail

◆ GetFolderAccessTypeList()

array GetFolderAccessTypeList ( )

Function that returns a list of the types of access restrictions to the album:   private, public, friends only, etc.

{
return ["Public", "Private"];
}

◆ GetServerParamList()

table GetServerParamList ( )
{
return
{
useWebdav = "Use WebDav",
token = "Token",
enableOAuth ="enableOAuth",
tokenType = "tokenType",
PrevLogin = "PrevLogin",
OAuthLogin = "OAuthLogin"
};
}

◆ IsAuthenticated()

int IsAuthenticated ( )
Returns
1 - is authenticated,
0 - is not authenticated

◆ UploadFile()

int UploadFile ( string  pathToFile,
UploadParams  params 
)

Required function for server Type="image" or Type="file".

Returns
1 - success,
0 - fail
-1 - fail and abort upload (for example, authorization failed, this value supported since v.1.3.1)