Ejemplo n.º 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()
         });
     }
 }
Ejemplo n.º 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());
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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()
             };
     }
 }