コード例 #1
0
        // w.bloggar workarounds/nominal MT support - HACKS

        // w.bloggar is not correctly implementing metaWeblogAPI on its getRecentPost call, it wants
        // an instance of blogger.getRecentPosts at various time.
        //
        // What works better with w.bloggar is to tell it to use MT settings. For w.bloggar users
        // with metaWeblog configured, we'll throw a more explanatory exception than method not found.

        // Wordpress API

        #region IWordPressApi Members

        public int newCategory(string blogid, string username, string password, WordpressCategory category)
        {
            var newCategory = new LinkCategory
            {
                CategoryType = CategoryType.PostCollection,
                Title        = category.name,
                IsActive     = true,
                Description  = category.name
            };

            newCategory.Id = Links.CreateLinkCategory(newCategory);

            return(newCategory.Id);
        }
コード例 #2
0
ファイル: MetaWeblog.cs プロジェクト: ayende/Subtext
        public int newCategory(string blogid, string username, string password, WordpressCategory category)
        {
            LinkCategory newCategory = new LinkCategory();
            newCategory.CategoryType = CategoryType.PostCollection;
            newCategory.Title = category.name;
            newCategory.IsActive = true;
            newCategory.Description = category.name;

            newCategory.Id = Links.CreateLinkCategory(newCategory);

            return newCategory.Id;
        }
コード例 #3
0
ファイル: MetaWeblog.cs プロジェクト: junxy/subtext_src
        public int newCategory(string blogid, string username, string password, WordpressCategory category)
        {
            var newCategory = new LinkCategory
            {
                CategoryType = CategoryType.PostCollection,
                Title = category.name,
                IsActive = true,
                Description = category.name
            };

            newCategory.Id = Repository.CreateLinkCategory(newCategory);

            return newCategory.Id;
        }