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
@@getstoragenodecmd =
nil
@@getstoragenodeextendedcmd =
nil
@@getdownloadlinkscmd =
nil
@@getoptimalurlscmd =
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



269
270
271
272
# File 'lib/nvx/sds/apicommand.rb', line 269

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", true) 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



291
292
293
294
# File 'lib/nvx/sds/apicommand.rb', line 291

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



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

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

.DeleteAllMetadataObject



174
175
176
177
# File 'lib/nvx/sds/apicommand.rb', line 174

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

.DeleteAllTagsObject



180
181
182
183
# File 'lib/nvx/sds/apicommand.rb', line 180

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

.DeleteChildAccountObject



297
298
299
300
# File 'lib/nvx/sds/apicommand.rb', line 297

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



186
187
188
189
# File 'lib/nvx/sds/apicommand.rb', line 186

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

.DeleteTagsObject



192
193
194
195
# File 'lib/nvx/sds/apicommand.rb', line 192

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

.ExtractVideoFramesObject



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

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

.GetAccountInfoObject



303
304
305
306
# File 'lib/nvx/sds/apicommand.rb', line 303

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

.GetAccountLimitsObject



315
316
317
318
# File 'lib/nvx/sds/apicommand.rb', line 315

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

.GetAccountNotesObject



309
310
311
312
# File 'lib/nvx/sds/apicommand.rb', line 309

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

.GetAccountUsageObject



321
322
323
324
# File 'lib/nvx/sds/apicommand.rb', line 321

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

DEPRECATED: Please use GetOptimalURLs instead.



148
149
150
151
# File 'lib/nvx/sds/apicommand.rb', line 148

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



198
199
200
201
# File 'lib/nvx/sds/apicommand.rb', line 198

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

.GetOptimalURLsObject



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

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

.GetStorageNodeObject



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

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

.GetStorageNodeExtendedObject



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

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

.GetTagsObject



204
205
206
207
# File 'lib/nvx/sds/apicommand.rb', line 204

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

.GetUploadNodeObject

DEPRECATED: Please use GetStorageNode or GetStorageNodeExtended instead.



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

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

.ImageResizeObject



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

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

.ImageRotateFlipObject



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

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

.ListChildAccountsObject



327
328
329
330
# File 'lib/nvx/sds/apicommand.rb', line 327

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



261
262
263
264
# File 'lib/nvx/sds/apicommand.rb', line 261

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



255
256
257
258
# File 'lib/nvx/sds/apicommand.rb', line 255

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



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

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

.SearchMetadataObject



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

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

.SearchTagsObject



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

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

.SetAccountInfoObject



333
334
335
336
# File 'lib/nvx/sds/apicommand.rb', line 333

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

.SetAccountLimitsObject



339
340
341
342
# File 'lib/nvx/sds/apicommand.rb', line 339

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

.SetAccountNotesObject



345
346
347
348
# File 'lib/nvx/sds/apicommand.rb', line 345

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", true) unless @@setchildaccountpasswordcmd
    @@setchildaccountpasswordcmd
end

.SetMetadataObject



210
211
212
213
# File 'lib/nvx/sds/apicommand.rb', line 210

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

.SetTagsObject



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

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

.SideloadObject



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

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

.VideoTranscodeObject



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

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