Skip to content

code simple

loudKode edited this page May 12, 2019 · 1 revision
Dim Clnt As DailymotionSDK.IClient = New DailymotionSDK.DClient("accesstoken")
Dim RSLT = Await Clnt.RemoteUpload("http://unlrvista.org/0/1690.MP4", "videoTitle", Nothing, Nothing, DailymotionSDK.DaMutilities.PrivacyEnum.Public)
Dim RSLT = Await Clnt.UserInfo("userID")
Dim RSLT = Await Clnt.ListFeaturesVideos("userID", 1)
Dim RSLT = Await Clnt.ListVideos("x268d4s", 1)
Dim RSLT = Await Clnt.DeleteVideo(T_DeleteVideoID.Text)
Dim RSLT = Await Clnt.VideoMetadata("x74yyud")
Dim RSLT = Await Clnt.EditVideo("x74yydx", Nothing, Nothing, Nothing, DailymotionSDK.DaMutilities.PrivacyEnum.Public)
Dim RSLT = Await Clnt.APIrateLimits()
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 progressIndicator_ReportCls As Progress(Of DailymotionSDK.ReportStatus) = New Progress(Of DailymotionSDK.ReportStatus)(Sub(ReportClass As DailymotionSDK.ReportStatus)
                                                                                                                                           Label1.Text = String.Format("{0}/{1}", ISisFunctions.Bytes_To_KbMbGb.SetBytes(ReportClass.BytesTransferred), ISisFunctions.Bytes_To_KbMbGb.SetBytes(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.UploadLocalFile(frm.FileName, DailymotionSDK.DClient.UploadTypes.FilePath, "filename_001", Nothing, Nothing, DailymotionSDK.DaMutilities.PrivacyEnum.Public, progressIndicator_ReportCls, Nothing, UploadCancellationToken.Token)
            DataGridView1.Rows.Add(RSLT.name, RSLT.id, RSLT.dimension, ConvDur(RSLT.duration), RSLT.format, RSLT.acodec, RSLT.bitrate, ConvSze(RSLT.size), RSLT.vcodec)
End If
Dim ScopStr As String = String.Join(" ", [Enum].GetValues(GetType(DailymotionSDK.GetToken.ScopesEnum)).Cast(Of DailymotionSDK.GetToken.ScopesEnum)().Select(Function(x) x.ToString()).ToArray())
Dim thUrl = DailymotionSDK.GetToken.By_AddressBar("xxxxxxx65b06", ScopStr)
Return thUrl.ToString
Dim RSLT = Await Clnt.GetVideoDirectLink("xu7heg")
Dim Get_Token = Await DailymotionSDK.GetToken.By_UsernameAndPassword("xxxxf65b06", "xxxxx7b8633f77be87c", RO_Seting.DailymotionUser, RO_Seting.DailymotionPass)
Clone this wiki locally