DeQmaTech.4sharedSDK
1.0.0
.NET Core 2.1
This package targets .NET Core 2.1. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.5.2
This package targets .NET Framework 4.5.2. The package is compatible with this framework or higher.
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
- Login
- Register
Account(Mine)
- UserInfo
- UpdateUserInfo
- GetAvatarPicture
- SetAvatarPicture
Comment
- ListComments
- Create
- Delete
- Reply
- ReportAsSpam
- UnReportAsSpam
Data
- SearchRoot
- EmptyRecycleBin
- ListRoot
- RootID
- RecycleBinID
- ListRecycleBin
- RestoreRecycleBin
- GetLinkForFile
File
- Upload
- UploadLargeFile
- Update
- UpdateLargeFile
- Copy
- CopyMultiple
- Move
- MoveMultiple
- Trash
- UnTrash
- TrashMultiple
- Delete
- DeleteMultiple
- Metadata
- EditMetadata
- ChangePrivacy
- Rename
- Download
- DownloadLargeFile
- DownloadAsStream
- ImportToMyAccount
- ThumbnailUrl
- UnZip
- Exists
Folder
- Password
- SetDescription
- ChangePermission
- ChangePrivacy
- Search
- ListSubFiles
- ListSubFolders
- Create
- Copy
- CopyMultiple
- Move
- MoveMultiple
- UnTrash
- Trash
- Delete
- DeleteMultiple
- TrashMultiple
- Rename
- Metadata
- Exists
- ExistsInTargetFolder
User
- SearchFiles
- Metadata
- AvatarPicture
- ListFilesRelatedToFile
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 | Versions 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.
-
.NETCoreApp 2.1
- Newtonsoft.Json (>= 11.0.2)
- System.Net.Http (>= 4.3.3)
-
.NETFramework 4.5.2
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 11.0.2)
- System.Net.Http (>= 4.3.3)
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 | 615 | 1/22/2020 |