Image Uploader Scripting API
Functions
implement.h File Reference

Functions

int Authenticate ()
 
int CreateFolder (CFolderItem parent, CFolderItem folder)
 
int DoLogout ()
 
array GetFolderAccessTypeList ()
 
int GetFolderList (CFolderList folderList)
 
table GetServerParamList ()
 
int IsAuthenticated ()
 
int ModifyFolder (CFolderItem folder)
 
int RefreshToken ()
 
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 your service supports authentication, you have to implement Authenticate function. If you want to support album listing/creating/modifying, you have to implement also GetFolderList, CreateFolder, ModifyFolder, GetFolderAccessTypeList.

Function Documentation

◆ Authenticate()

int Authenticate ( )
Returns
1 - success,
0 - failure

◆ 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"];
}
array GetFolderAccessTypeList()

◆ GetServerParamList()

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

◆ IsAuthenticated()

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

◆ RefreshToken()

int RefreshToken ( )
Since
1.3.3
Returns
1 - success,
0 - failure

◆ 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)