Class: NVX::SDS::APICommand

Inherits:
Object
  • Object
show all
Defined in:
lib/nvx/sds/apicommand.rb

Overview

The APICommand object defines all the namespaces and methods in the Nirvanix services. in the future this could be split into multiple namespaces but for now there are no collisions.

Constant Summary collapse

@@logincmd =

Authentication Namespace

nil
@@logoutcmd =
nil
@@changepasswordcmd =
nil
@@setchildaccountpasswordcmd =
nil
@@listfoldercmd =

IMFS Namespace

nil
@@createfolderscmd =
nil
@@deletefolderscmd =
nil
@@copyfolderscmd =
nil
@@movefolderscmd =
nil
@@copyfilescmd =
nil
@@movefilescmd =
nil
@@renamefoldercmd =
nil
@@renamefilecmd =
nil
@@deletefilescmd =
nil
@@getdownloadnodescmd =
nil
@@getuploadnodecmd =
nil
@@getdownloadlinkscmd =
nil
@@searchfilesystemcmd =
nil
@@sideloadcmd =
nil
@@deleteallmetadatacmd =

MetaData Namespace

nil
@@deletealltagscmd =
nil
@@deletemetadatacmd =
nil
@@deletetagscmd =
nil
@@getmetadatacmd =
nil
@@gettagscmd =
nil
@@setmetadatacmd =
nil
@@settagscmd =
nil
@@searchmetadatacmd =
nil
@@searchtagscmd =
nil
@@imageresizecmd =

Image Namespace

nil
@@imagerotateflipcmd =
nil
@@createhosteditemcmd =

Sharing Namespace

nil
@@removehosteditemcmd =
nil
@@listhosteditemscmd =
nil
@@audiotranscodecmd =

Audio Namespace

nil
@@videotranscodecmd =

Video Namespace

nil
@@extractvideoframescmd =
nil
@@createchildaccountcmd =

Accounting Namespace

nil
@@deletechildaccountcmd =
nil
@@getaccountinfocmd =
nil
@@getaccountnotescmd =
nil
@@getaccountlimitscmd =
nil
@@getaccountusagecmd =
nil
@@listchildaccountscmd =
nil
@@setaccountinfocmd =
nil
@@setaccountlimitscmd =
nil
@@setaccountnotescmd =
nil

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command_path, is_secure) ⇒ APICommand

Initialize method sets the command and if its to be executed via SSL. You can change the method to be secure for any call but currently only the Login command is marked as secure.



17
18
19
20
# File 'lib/nvx/sds/apicommand.rb', line 17

def initialize(command_path, is_secure)
    @command_path = command_path
    @is_secure = is_secure
end

Class Method Details

.AudioTranscodeObject



249
250
251
252
# File 'lib/nvx/sds/apicommand.rb', line 249

def APICommand.AudioTranscode
    @@audiotranscodecmd = new("Audio/Transcode.ashx", false) unless @@audiotranscodecmd
    @@audiotranscodecmd
end

.ChangePasswordObject



48
49
50
51
# File 'lib/nvx/sds/apicommand.rb', line 48

def APICommand.ChangePassword
    @@changepasswordcmd = new("Authentication/ChangePassword.ashx", false) unless @@changepasswordcmd
    @@changepasswordcmd
end

.CopyFilesObject



92
93
94
95
# File 'lib/nvx/sds/apicommand.rb', line 92

def APICommand.CopyFiles
    @@copyfilescmd = new("IMFS/CopyFiles.ashx", false) unless @@copyfilescmd
    @@copyfilescmd
end

.CopyFoldersObject



80
81
82
83
# File 'lib/nvx/sds/apicommand.rb', line 80

def APICommand.CopyFolders
    @@copyfolderscmd = new("IMFS/CopyFolders.ashx", false) unless @@copyfolderscmd
    @@copyfolderscmd
end

.CreateChildAccountObject



271
272
273
274
# File 'lib/nvx/sds/apicommand.rb', line 271

def APICommand.CreateChildAccount
    @@createchildaccountcmd = new("Accounting/CreateChildAccount.ashx", false) unless @@createchildaccountcmd
    @@createchildaccountcmd
end

.CreateFoldersObject



68
69
70
71
# File 'lib/nvx/sds/apicommand.rb', line 68

def APICommand.CreateFolders
    @@createfolderscmd = new("IMFS/CreateFolders.ashx", false) unless @@createfolderscmd
    @@createfolderscmd
end

.CreateHostedItemObject



229
230
231
232
# File 'lib/nvx/sds/apicommand.rb', line 229

def APICommand.CreateHostedItem
    @@createhosteditemcmd = new("Sharing/CreateHostedItem.ashx", false) unless @@createhosteditemcmd
    @@createhosteditemcmd
end

.DeleteAllMetadataObject



154
155
156
157
# File 'lib/nvx/sds/apicommand.rb', line 154

def APICommand.DeleteAllMetadata
    @@deleteallmetadatacmd = new("Metadata/DeleteAllMetadata.ashx", false) unless @@deleteallmetadatacmd
    @@deleteallmetadatacmd
end

.DeleteAllTagsObject



160
161
162
163
# File 'lib/nvx/sds/apicommand.rb', line 160

def APICommand.DeleteAllTags
    @@deletealltagscmd = new("Metadata/DeleteAllTags.ashx", false) unless @@deletealltagscmd
    @@deletealltagscmd
end

.DeleteChildAccountObject



277
278
279
280
# File 'lib/nvx/sds/apicommand.rb', line 277

def APICommand.DeleteChildAccount
    @@deletechildaccountcmd = new("Accounting/DeleteChildAccount.ashx", false) unless @@deletechildaccountcmd
    @@deletechildaccountcmd
end

.DeleteFilesObject



116
117
118
119
# File 'lib/nvx/sds/apicommand.rb', line 116

def APICommand.DeleteFiles
    @@deletefilescmd = new("IMFS/DeleteFiles.ashx", false) unless @@deletefilescmd
    @@deletefilescmd
end

.DeleteFoldersObject



74
75
76
77
# File 'lib/nvx/sds/apicommand.rb', line 74

def APICommand.DeleteFolders
    @@deletefolderscmd = new("IMFS/DeleteFolders.ashx", false) unless @@deletefolderscmd
    @@deletefolderscmd
end

.DeleteMetadataObject



166
167
168
169
# File 'lib/nvx/sds/apicommand.rb', line 166

def APICommand.DeleteMetadata
    @@deletemetadatacmd = new("Metadata/DeleteMetadata.ashx", false) unless @@deletemetadatacmd
    @@deletemetadatacmd
end

.DeleteTagsObject



172
173
174
175
# File 'lib/nvx/sds/apicommand.rb', line 172

def APICommand.DeleteTags
    @@deletetagscmd = new("Metadata/DeleteTags.ashx", false) unless @@deletetagscmd
    @@deletetagscmd
end

.ExtractVideoFramesObject



263
264
265
266
# File 'lib/nvx/sds/apicommand.rb', line 263

def APICommand.ExtractVideoFrames
    @@extractvideoframescmd = new("Video/ExtractFrames.ashx", false) unless @@extractvideoframescmd
    @@extractvideoframescmd
end

.GetAccountInfoObject



283
284
285
286
# File 'lib/nvx/sds/apicommand.rb', line 283

def APICommand.GetAccountInfo
    @@getaccountinfocmd = new("Accounting/GetAccountInfo.ashx", false) unless @@getaccountinfocmd
    @@getaccountinfocmd
end

.GetAccountLimitsObject



295
296
297
298
# File 'lib/nvx/sds/apicommand.rb', line 295

def APICommand.GetAccountLimits
    @@getaccountlimitscmd = new("Accounting/GetAccountLimits.ashx", false) unless @@getaccountlimitscmd
    @@getaccountlimitscmd
end

.GetAccountNotesObject



289
290
291
292
# File 'lib/nvx/sds/apicommand.rb', line 289

def APICommand.GetAccountNotes
    @@getaccountnotescmd = new("Accounting/GetAccountNotes.ashx", false) unless @@getaccountnotescmd
    @@getaccountnotescmd
end

.GetAccountUsageObject



301
302
303
304
# File 'lib/nvx/sds/apicommand.rb', line 301

def APICommand.GetAccountUsage
    @@getaccountusagecmd = new("Accounting/GetAccountUsage.ashx", false) unless @@getaccountusagecmd
    @@getaccountusagecmd
end


134
135
136
137
# File 'lib/nvx/sds/apicommand.rb', line 134

def APICommand.GetDownloadLinks
    @@getdownloadlinkscmd = new("IMFS/GetDownloadLinks.ashx", false) unless @@getdownloadlinkscmd
    @@getdownloadlinkscmd
end

.GetDownloadNodesObject



122
123
124
125
# File 'lib/nvx/sds/apicommand.rb', line 122

def APICommand.GetDownloadNodes
    @@getdownloadnodescmd = new("IMFS/GetDownloadNodes.ashx", false) unless @@getdownloadnodescmd
    @@getdownloadnodescmd
end

.GetMetadataObject



178
179
180
181
# File 'lib/nvx/sds/apicommand.rb', line 178

def APICommand.GetMetadata
    @@getmetadatacmd = new("Metadata/GetMetadata.ashx", false) unless @@getmetadatacmd
    @@getmetadatacmd
end

.GetTagsObject



184
185
186
187
# File 'lib/nvx/sds/apicommand.rb', line 184

def APICommand.GetTags
    @@gettagscmd = new("Metadata/GetTags.ashx", false) unless @@gettagscmd
    @@gettagscmd
end

.GetUploadNodeObject



128
129
130
131
# File 'lib/nvx/sds/apicommand.rb', line 128

def APICommand.GetUploadNode
    @@getuploadnodecmd = new("IMFS/GetUploadNode.ashx", false) unless @@getuploadnodecmd
    @@getuploadnodecmd
end

.ImageResizeObject



215
216
217
218
# File 'lib/nvx/sds/apicommand.rb', line 215

def APICommand.ImageResize
    @@imageresizecmd = new("Image/Resize.ashx", false) unless @@imageresizecmd
    @@imageresizecmd
end

.ImageRotateFlipObject



221
222
223
224
# File 'lib/nvx/sds/apicommand.rb', line 221

def APICommand.ImageRotateFlip
    @@imagerotateflipcmd = new("Image/RotateFlip.ashx", false) unless @@imagerotateflipcmd
    @@imagerotateflipcmd
end

.ListChildAccountsObject



307
308
309
310
# File 'lib/nvx/sds/apicommand.rb', line 307

def APICommand.ListChildAccounts
    @@listchildaccountscmd = new("Accounting/ListChildAccounts.ashx", false) unless @@listchildaccountscmd
    @@listchildaccountscmd
end

.ListFolderObject



62
63
64
65
# File 'lib/nvx/sds/apicommand.rb', line 62

def APICommand.ListFolder
    @@listfoldercmd = new("IMFS/ListFolder.ashx", false) unless @@listfoldercmd
    @@listfoldercmd
end

.ListHostedItemsObject



241
242
243
244
# File 'lib/nvx/sds/apicommand.rb', line 241

def APICommand.ListHostedItems
    @@listhosteditemscmd = new("Sharing/ListHostedItems.ashx", false) unless @@listhosteditemscmd
    @@listhosteditemscmd
end

.LoginObject



36
37
38
39
# File 'lib/nvx/sds/apicommand.rb', line 36

def APICommand.Login
    @@logincmd = new("Authentication/Login.ashx", true) unless @@logincmd
    @@logincmd
end

.LogoutObject



42
43
44
45
# File 'lib/nvx/sds/apicommand.rb', line 42

def APICommand.Logout 
    @@logoutcmd = new("Authentication/Logout.ashx", false) unless @@logoutcmd
    @@logoutcmd
end

.MoveFilesObject



98
99
100
101
# File 'lib/nvx/sds/apicommand.rb', line 98

def APICommand.MoveFiles
    @@movefilescmd = new("IMFS/MoveFiles.ashx", false) unless @@movefilescmd
    @@movefilescmd
end

.MoveFoldersObject



86
87
88
89
# File 'lib/nvx/sds/apicommand.rb', line 86

def APICommand.MoveFolders
    @@movefolderscmd = new("IMFS/MoveFolders.ashx", false) unless @@movefolderscmd
    @@movefolderscmd
end

.RemoveHostedItemObject



235
236
237
238
# File 'lib/nvx/sds/apicommand.rb', line 235

def APICommand.RemoveHostedItem
    @@removehosteditemcmd = new("Sharing/RemoveHostedItem.ashx", false) unless @@removehosteditemcmd
    @@removehosteditemcmd
end

.RenameFileObject



110
111
112
113
# File 'lib/nvx/sds/apicommand.rb', line 110

def APICommand.RenameFile
    @@renamefilecmd = new("IMFS/RenameFile.ashx", false) unless @@renamefilecmd
    @@renamefilecmd
end

.RenameFolderObject



104
105
106
107
# File 'lib/nvx/sds/apicommand.rb', line 104

def APICommand.RenameFolder
    @@renamefoldercmd = new("IMFS/RenameFolder.ashx", false) unless @@renamefoldercmd
    @@renamefoldercmd
end

.SearchFileSystemObject



140
141
142
143
# File 'lib/nvx/sds/apicommand.rb', line 140

def APICommand.SearchFileSystem
    @@searchfilesystemcmd = new("IMFS/SearchFileSystem.ashx", false) unless @@searchfilesystemcmd
    @@searchfilesystemcmd
end

.SearchMetadataObject



202
203
204
205
# File 'lib/nvx/sds/apicommand.rb', line 202

def APICommand.SearchMetadata
    @@searchmetadatacmd = new("Metadata/SearchMetadata.ashx", false) unless @@searchmetadatacmd
    @@searchmetadatacmd
end

.SearchTagsObject



208
209
210
211
# File 'lib/nvx/sds/apicommand.rb', line 208

def APICommand.SearchTags
    @@searchtagscmd = new("Metadata/SearchTags.ashx", false) unless @@searchtagscmd
    @@searchtagscmd
end

.SetAccountInfoObject



313
314
315
316
# File 'lib/nvx/sds/apicommand.rb', line 313

def APICommand.SetAccountInfo
    @@setaccountinfocmd = new("Accounting/SetAccountInfo.ashx", false) unless @@setaccountinfocmd
    @@setaccountinfocmd
end

.SetAccountLimitsObject



319
320
321
322
# File 'lib/nvx/sds/apicommand.rb', line 319

def APICommand.SetAccountLimits
    @@setaccountlimitscmd = new("Accounting/SetAccountLimits.ashx", false) unless @@setaccountlimitscmd
    @@setaccountlimitscmd
end

.SetAccountNotesObject



325
326
327
328
# File 'lib/nvx/sds/apicommand.rb', line 325

def APICommand.SetAccountNotes
    @@setaccountnotescmd = new("Accounting/SetAccountNotes.ashx", false) unless @@setaccountnotescmd
    @@setaccountnotescmd
end

.SetChildAccountPasswordObject



54
55
56
57
# File 'lib/nvx/sds/apicommand.rb', line 54

def APICommand.SetChildAccountPassword
    @@setchildaccountpasswordcmd = new("Authentication/SetChildAccountPassword.ashx", false) unless @@setchildaccountpasswordcmd
    @@setchildaccountpasswordcmd
end

.SetMetadataObject



190
191
192
193
# File 'lib/nvx/sds/apicommand.rb', line 190

def APICommand.SetMetadata
    @@setmetadatacmd = new("Metadata/SetMetadata.ashx", false) unless @@setmetadatacmd
    @@setmetadatacmd
end

.SetTagsObject



196
197
198
199
# File 'lib/nvx/sds/apicommand.rb', line 196

def APICommand.SetTags
    @@settagscmd = new("Metadata/SetTags.ashx", false) unless @@settagscmd
    @@settagscmd
end

.SideloadObject



146
147
148
149
# File 'lib/nvx/sds/apicommand.rb', line 146

def APICommand.Sideload
    @@sideloadcmd = new("IMFS/Sideload.ashx", false) unless @@sideloadcmd
    @@sideloadcmd
end

.VideoTranscodeObject



257
258
259
260
# File 'lib/nvx/sds/apicommand.rb', line 257

def APICommand.VideoTranscode
    @@videotranscodecmd = new("Video/Transcode.ashx", false) unless @@videotranscodecmd
    @@videotranscodecmd
end

Instance Method Details

#command_pathObject

The namespace/path of the command.



28
29
30
# File 'lib/nvx/sds/apicommand.rb', line 28

def command_path
    @command_path
end

#is_secure?Boolean

Used to determine if a command is using SSL.

Returns:

  • (Boolean)


23
24
25
# File 'lib/nvx/sds/apicommand.rb', line 23

def is_secure?
    @is_secure
end