Пример #1
0
 public UserInfo GetUserInfo(string key, string username, string password)
 {
     using (var metaWeblog = new MetaWeblogData(username, password))
     {
         return(new UserInfo
         {
             email = metaWeblog.Author.Email,
             nickname = metaWeblog.Author.Name,
             userid = metaWeblog.Author.Id.ToString()
         });
     }
 }
Пример #2
0
 public BlogInfo[] GetUsersBlogs(string key, string username, string password)
 {
     using (var metaWeblog = new MetaWeblogData(username, password))
     {
         var userBlogs = new List <BlogInfo>();
         foreach (IPage page in metaWeblog.GetBlogPages())
         {
             userBlogs.Add(
                 new BlogInfo
             {
                 blogid   = page.Id.ToString(),
                 blogName = page.GetLabel(),
                 url      = page.GetPublicUrl()
             }
                 );
         }
         return(userBlogs.ToArray());
     }
 }
Пример #3
0
 public BlogInfo[] GetUsersBlogs(string key, string username, string password)
 {
     using (var metaWeblog = new MetaWeblogData(username, password))
     {
         var userBlogs = new List<BlogInfo>();
         foreach (IPage page in metaWeblog.GetBlogPages())
         {
             userBlogs.Add(
                 new BlogInfo
                     {
                         blogid = page.Id.ToString(),
                         blogName = page.GetLabel(),
                         url = page.GetPublicUrl()
                     }
                 );
         }
         return userBlogs.ToArray();
     }
 }
Пример #4
0
 public UserInfo GetUserInfo(string key, string username, string password)
 {
     using (var metaWeblog = new MetaWeblogData(username, password))
     {
         return new UserInfo
             {
                 email = metaWeblog.Author.Email,
                 nickname = metaWeblog.Author.Name,
                 userid = metaWeblog.Author.Id.ToString()
             };
     }
 }