예제 #1
0
        static void Main(string[] args)
        {
            var _client = new StreamableAPI();

            string filePath  = "c:\\temp\\zyra.mp4";
            string userName  = "******";
            string password  = "******";
            string urlImport = "https://cdn.streamable.com/video/mp4/mjk3.mp4";

            var res1 = _client.GEToEmbed("https://streamable.com/uz0t");

            var res21 = _client.Import(urlImport,
                                       userName,
                                       password);

            var res22 = _client.Import(urlImport);

            var res31 = _client.Upload(filePath, userName, password);
            var res32 = _client.Upload(filePath);

            var res4 = _client.Retrive("uz0t");

            var res5 = _client.RetrieveUser("snmslavk");

            var res6 = _client.RetrieveAuthUser(userName, password);
        }
예제 #2
0
        public void UploadVideoTest()
        {
            webClientMoq.Setup(
                foo => foo.UploadFile(
                    It.IsAny <UploadAuthFileModel>()
                    )
                ).Returns(new UploadVideoResponse());

            webClientMoq.Setup(
                foo => foo.UploadFile(
                    It.IsAny <string>(),
                    It.IsAny <string>(),
                    It.IsAny <string>(),
                    It.IsAny <string>()
                    )
                ).Returns(new UploadVideoResponse());

            Assert.IsNotNull(
                client.Upload(dir + ConfigVals.testVideoPath)
                );

            Assert.IsInstanceOf <UploadVideoResponse>(
                client.Upload(dir + ConfigVals.testVideoPath)
                );
        }