public static void Run()
        {
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance   = new PagesApi(configuration);

            try
            {
                var fileInfo = new FileInfo
                {
                    FilePath = "Pdf/ten-pages.pdf"
                };

                var options = new RotateOptions
                {
                    FileInfo   = fileInfo,
                    OutputPath = "Output/rotate-pages.pdf",
                    Pages      = new List <int?> {
                        2, 4
                    },
                    Mode = RotateOptions.ModeEnum.Rotate90
                };
                var request = new RotateRequest(options);

                var response = apiInstance.Rotate(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling api: " + e.Message);
            }
        }
        private byte[] GetPagesCreated(DataClientConfiguration clientConfiguration, DataFileFormat fileFormat)
        {
            var client      = new JustGivingDataClient(clientConfiguration);
            var pagesClient = new PagesApi(client.HttpChannel);

            return(pagesClient.RetrievePagesCreated(_startDate, _endDate, fileFormat));
        }
        public static void Run()
        {
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance   = new PagesApi(configuration);

            try
            {
                var fileInfo = new FileInfo
                {
                    FilePath = "WordProcessing/four-pages.docx"
                };

                var options = new OrientationOptions
                {
                    FileInfo   = fileInfo,
                    OutputPath = "Output/change-page-orientation.docx",
                    Pages      = new List <int?> {
                        2, 4
                    },
                    Mode = OrientationOptions.ModeEnum.Landscape
                };
                var request = new OrientationRequest(options);

                var response = apiInstance.Orientation(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling api: " + e.Message);
            }
        }
示例#4
0
        public static void Run()
        {
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance   = new PagesApi(configuration);

            try
            {
                var fileInfo = new FileInfo
                {
                    FilePath = "WordProcessing/sample-10-pages.docx"
                };

                var options = new ExtractOptions
                {
                    FileInfo        = fileInfo,
                    OutputPath      = "Output/extract-pages-by-range.docx",
                    StartPageNumber = 1,
                    EndPageNumber   = 10,
                    RangeMode       = PageOptions.RangeModeEnum.EvenPages
                };
                var request = new ExtractRequest(options);

                var response = apiInstance.Extract(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling api: " + e.Message);
            }
        }
示例#5
0
        public static void Run()
        {
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance   = new PagesApi(configuration);

            try
            {
                var fileInfo = new FileInfo
                {
                    FilePath = "WordProcessing/sample-10-pages.docx"
                };

                var options = new ExtractOptions
                {
                    FileInfo   = fileInfo,
                    OutputPath = "Output/extract-pages-by-numbers.docx",
                    Pages      = new List <int?> {
                        2, 4, 7
                    }
                };
                var request = new ExtractRequest(options);

                var response = apiInstance.Extract(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling api: " + e.Message);
            }
        }
        public static void Run()
        {
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance   = new PagesApi(configuration);

            try
            {
                var fileInfo = new FileInfo
                {
                    FilePath = "WordProcessing/four-pages.docx"
                };

                var options = new SwapOptions
                {
                    FileInfo         = fileInfo,
                    OutputPath       = "Output/swap-pages.docx",
                    FirstPageNumber  = 2,
                    SecondPageNumber = 4
                };
                var request = new SwapRequest(options);

                var response = apiInstance.Swap(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling api: " + e.Message);
            }
        }
        /// <summary>
        /// Creates a client to work with VK API methods.
        /// </summary>
        public CitrinaClient()
        {
            AuthHelper = new AuthHelper();
            Execute    = new ExecuteApi();

            Account       = new AccountApi();
            Ads           = new AdsApi();
            Apps          = new AppsApi();
            Auth          = new AuthApi();
            Board         = new BoardApi();
            Database      = new DatabaseApi();
            Docs          = new DocsApi();
            Fave          = new FaveApi();
            Friends       = new FriendsApi();
            Gifts         = new GiftsApi();
            Groups        = new GroupsApi();
            Leads         = new LeadsApi();
            Likes         = new LikesApi();
            Market        = new MarketApi();
            Messages      = new MessagesApi();
            Newsfeed      = new NewsfeedApi();
            Notes         = new NotesApi();
            Notifications = new NotificationsApi();
            Orders        = new OrdersApi();
            Pages         = new PagesApi();
            Photos        = new PhotosApi();
            Places        = new PlacesApi();
            Polls         = new PollsApi();
            Search        = new SearchApi();
            Secure        = new SecureApi();
            Stats         = new StatsApi();
            Status        = new StatusApi();
            Storage       = new StorageApi();
            Users         = new UsersApi();
            Utils         = new UtilsApi();
            Video         = new VideoApi();
            Wall          = new WallApi();
            Widgets       = new WidgetsApi();
        }