DeQmaTech.4sharedSDK 1.0.0

dotnet add package DeQmaTech.4sharedSDK --version 1.0.0                
NuGet\Install-Package DeQmaTech.4sharedSDK -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DeQmaTech.4sharedSDK" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DeQmaTech.4sharedSDK --version 1.0.0                
#r "nuget: DeQmaTech.4sharedSDK, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DeQmaTech.4sharedSDK as a Cake Addin
#addin nuget:?package=DeQmaTech.4sharedSDK&version=1.0.0

// Install DeQmaTech.4sharedSDK as a Cake Tool
#tool nuget:?package=DeQmaTech.4sharedSDK&version=1.0.0                

Features:

  • Assemblies for .NET 4.5.2 and .NET Standard 2.0 and .NET Core 2.1
  • Just one external reference (Newtonsoft.Json)
  • Easy installation using NuGet
  • Upload/Download tracking support
  • Proxy Support
  • Upload/Download cancellation support

List of functions:

Token

  1. Login
  2. Register

Account(Mine)

  1. UserInfo
  2. UpdateUserInfo
  3. GetAvatarPicture
  4. SetAvatarPicture

Comment

  1. ListComments
  2. Create
  3. Delete
  4. Reply
  5. ReportAsSpam
  6. UnReportAsSpam

Data

  1. SearchRoot
  2. EmptyRecycleBin
  3. ListRoot
  4. RootID
  5. RecycleBinID
  6. ListRecycleBin
  7. RestoreRecycleBin
  8. GetLinkForFile

File

  1. Upload
  2. UploadLargeFile
  3. Update
  4. UpdateLargeFile
  5. Copy
  6. CopyMultiple
  7. Move
  8. MoveMultiple
  9. Trash
  10. UnTrash
  11. TrashMultiple
  12. Delete
  13. DeleteMultiple
  14. Metadata
  15. EditMetadata
  16. ChangePrivacy
  17. Rename
  18. Download
  19. DownloadLargeFile
  20. DownloadAsStream
  21. ImportToMyAccount
  22. ThumbnailUrl
  23. UnZip
  24. Exists

Folder

  1. Password
  2. SetDescription
  3. ChangePermission
  4. ChangePrivacy
  5. Search
  6. ListSubFiles
  7. ListSubFolders
  8. Create
  9. Copy
  10. CopyMultiple
  11. Move
  12. MoveMultiple
  13. UnTrash
  14. Trash
  15. Delete
  16. DeleteMultiple
  17. TrashMultiple
  18. Rename
  19. Metadata
  20. Exists
  21. ExistsInTargetFolder

User

  1. SearchFiles
  2. Metadata
  3. AvatarPicture
  4. ListFilesRelatedToFile

CodeMap:

codemap

Code simple:

'first login (one time only)

    Async Sub Login_Base64()
        Dim lgnBase64 = Await FourSharedSDK.GetToken.Login_Base64("JackKoolage@go.com", "123456")
    End Sub

'Set your client
    Dim Clnt As FourSharedSDK.IClient = New FourSharedSDK.FClient(lgnBase64, Nothing)



'Functions:
Imports FourSharedSDK.utilitiez

Async Sub UserInfo()
Await Clnt.Account.UserInfo()
End Sub

Async Sub UpdateUserInfo()
Await Clnt.Account.UpdateUserInfo(Nothing, Nothing, Nothing, Nothing, AllowSearchEnum.disabled)
End Sub

Async Sub GetAvatarPicture()
Await Clnt.Account.AvatarPicture(ImageSizeEnum._72x72)
End Sub

Async Sub SetAvatarPicture()
Await Clnt.Account.SetAvatarPicture("C:\1e.jpg", UploadTypes.FilePath, "1e.jpg", Nothing, Nothing)
End Sub

Async Sub LisSubtFiles()
Dim rslt = Await Clnt.Folders.ListSubFiles("Dir_id", Nothing, 100, 0)

For Each onz In rslt.files
DataGridView1.Rows.Add(onz.name, onz.downloadUrl, onz.ImgUrl(ImageSizeEnum._320x240))
Next
End Sub

Async Sub ListSubFolders()
Await Clnt.Folders.ListSubFolders("Dir_id", 100, 0)
End Sub

Async Sub Search()
Dim rslt = Await Clnt.Folders.Search("Dir_id", TextBox_searchKeyword.Text, Nothing, 100, 0)

For Each onz In rslt.files
DataGridView1.Rows.Add(onz.name, onz.IsPrivate, onz.id, ConvSze(onz.size), onz.thumbnailUrl, onz.parentId, onz.downloadUrl, onz.ImgUrl(ImageSizeEnum._320x240))
Next
End Sub

Async Sub SearchRoot()
Await Clnt.Data.SearchRoot(TextBox_searchKeyword.Text, Nothing, 100, 0)
End Sub

Async Sub ChangePermission()
Await Clnt.Folders.ChangePermission("Dir_id", FolderPermissionsEnum.read)
End Sub

Async Sub ChangePrivacy()
Await Clnt.Folders.ChangePrivacy("Dir_id", PrivacyEnum.private)
End Sub

Async Sub Password()
Await Clnt.Folders.Password("Dir_id", "1905")
End Sub

Async Sub FolderMetadata()
Await Clnt.Folders.Metadata("Dir_id")
End Sub

Async Sub FileMetadata()
Await Clnt.Files.Metadata("File_id", AddFieldsEnum.ImageMetainfo)
End Sub

Async Sub Exists()
Await Clnt.Folders.Exists("Dir_id")
End Sub

Async Sub SetDescription()
Await Clnt.Folders.SetDescription("Dir_id", "look at this")
End Sub

Async Sub ListRoot()
Dim getRootId= Await Clnt.Account.UserInfo()
Await Clnt.Data.ListRoot(getRootId.rootFolderId, 100, 0)
End Sub

Async Sub UsersSearchFiles()
Dim rslt = Await Clnt.Users.SearchFiles("big", FileTypeEnum.Archives, Nothing, Nothing, Nothing, SortByEnum.size, OrderByEnum.asc, 100, 0)
End Sub

Async Sub Upload()
Dim frm As New DeQma.FileFolderDialogs.VistaOpenFileDialog With {.Multiselect = False}
If frm.ShowDialog = DialogResult.OK AndAlso Not String.IsNullOrEmpty(frm.FileName) Then

Dim UploadCancellationToken As New Threading.CancellationTokenSource()
Dim _ReportCls As New Progress(Of FourSharedSDK.ReportStatus)(Sub(ReportClass As FourSharedSDK.ReportStatus)
  Label1.Text = String.Format("{0}/{1}", ConvSze(ReportClass.BytesTransferred), ConvSze(ReportClass.TotalBytes))
  ProgressBar1.Value = CInt(ReportClass.ProgressPercentage)
  Label2.Text = If(CStr(ReportClass.TextStatus) Is Nothing, "Uploading...", CStr(ReportClass.TextStatus))
  End Sub)
Dim rslt = Await Clnt.Files.Upload(frm.FileName, UploadTypes.FilePath, "Dir_id", IO.Path.GetFileName(frm.FileName), _ReportCls, UploadCancellationToken.Token)
PropertyGrid1.SelectedObject = rslt
End If
End Sub

Async Sub UploadLargeFile()
Dim sze = New IO.FileInfo(frm.FileName).Length
Await Clnt.Files.UploadLargeFile(frm.FileName, UploadTypes.FilePath, "Dir_id", IO.Path.GetFileName(frm.FileName), sze, nothing, nothing)
End Sub

Async Sub DeleteMultipleFiles()
Await Clnt.Files.DeleteMultiple(New List(Of String) From {"File_id_1", "File_id_2", "File_id_3"})
End Sub

Async Sub Download()
Dim frm As New DeQma.FileFolderDialogs.VistaFolderBrowserDialog With {.ShowNewFolderButton = True}
If frm.ShowDialog = DialogResult.OK AndAlso Not String.IsNullOrEmpty(frm.SelectedPath) Then
Dim UploadCancellationToken As New Threading.CancellationTokenSource()
Dim _ReportCls As New Progress(Of FourSharedSDK.ReportStatus)(Sub(ReportClass As FourSharedSDK.ReportStatus)
  Label1.Text = String.Format("{0}/{1}", ConvSze(ReportClass.BytesTransferred), ConvSze(ReportClass.TotalBytes))
  ProgressBar1.Value = CInt(ReportClass.ProgressPercentage)
  Label2.Text = If(CStr(ReportClass.TextStatus) Is Nothing, "Downloading...", CStr(ReportClass.TextStatus))
  End Sub)
Dim getFileId= Await Clnt.Files.Metadata("File_id")
Await Clnt.Files.Download(getFileId.path, frm.SelectedPath, _ReportCls, UploadCancellationToken.Token)
End If
End Sub

Async Sub UsersAvatar()
Await Clnt.Users.AvatarPicture("User_id", ImageSizeEnum._2560x1600)
End Sub

Async Sub ExistsInDir()
Await Clnt.Folders.ExistsInTargetFolder("New%20folder", "Dir_id")
End Sub

Async Sub TrashMultipleFolders()
Await Clnt.Folders.TrashMultiple(New List(Of String) From {"Dir_id_1", "Dir_id_2"})
End Sub

Async Sub ListComments()
Await Clnt.Comments.ListComments("File_id", 100, 0)
End Sub

Async Sub Comment()
Await Clnt.Comments.Create("File_id", "test api")
End Sub

Async Sub CommentDelete()
Await Clnt.Comments.Delete("File_id", "Comment_id")
End Sub

Async Sub ReplyComment()
Await Clnt.Comments.Reply("File_id", "Comment_id", "testing message...")
End Sub

Async Sub ReportAsSpam_UnReportAsSpam()
Dim reporting = Await Clnt.Comments.ReportAsSpam("Comment_id")
Await Clnt.Comments.UnReportAsSpam(reporting)
End Sub

Async Sub ListFilesRelatedToFile()
Dim rslt = Await Clnt.Users.ListFilesRelatedToFile("File_id", 100, 0)

For Each onz In rslt.files
DataGridView1.Rows.Add(onz.name, onz.ImgUrl(ImageSizeEnum._320x240))
Next
End Sub

Async Sub ImportToMyAccount()
Await Clnt.Files.ImportToMyAccount("File_id", "ImportToDir_id")
End Sub

Async Sub EmptyRecycleBin()
Await Clnt.Data.EmptyRecycleBin()
End Sub

Async Sub RestoreRecycleBin()
Dim recBinId = Await Clnt.Data.RecycleBinID
Await Clnt.Data.RestoreRecycleBin(recBinId)
End Sub

Async Sub GetLinkForFile()
Await Clnt.Data.GetLinkForFile()
End Sub

Async Sub FileUnZip()
Await Clnt.Files.UnZip("File_id")
End Sub

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 616 1/22/2020