using System.ServiceModel;
using System.Runtime.Serialization;
namespace dasBlog.Services.Contracts.Blogger{
/// <summary>
///
/// </summary>
[DataContract(Namespace = "http://www.blogger.com/developers/api/1_docs/")]
public class Category
{
/// <summary>
///
/// </summary>
[DataMember]
public string categoryid { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string title { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string description { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string htmlUrl { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string rssUrl { get; set; }
}
/// <summary>
///
/// </summary>
[DataContract(Namespace="http://www.blogger.com/developers/api/1_docs/")]
public class Post
{
/// <summary>
///
/// </summary>
[DataMember]
public System.DateTime dateCreated { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string userid { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string postid { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string content { get; set; }
}
/// <summary>
///
/// </summary>
[DataContract(Namespace = "http://www.blogger.com/developers/api/1_docs/")]
public class UserInfo
{
/// <summary>
///
/// </summary>
[DataMember]
public string url { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string email { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string nickname { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string lastname { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string firstname { get; set; }
}
/// <summary>
///
/// </summary>
[DataContract(Namespace = "http://www.blogger.com/developers/api/1_docs/")]
public class BlogInfo
{
/// <summary>
///
/// </summary>
[DataMember]
public string blogid { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string url { get; set; }
/// <summary>
///
/// </summary>
[DataMember]
public string blogName { get; set; }
}
/// <summary>
///
/// </summary>
[ServiceContract(Namespace = "http://www.blogger.com/developers/api/1_docs/")]
public interface IBlogger
{
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="postid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="publish"></param>
/// <returns></returns>
[OperationContract(Action="blogger.deletePost")]
bool blogger_deletePost(
string appKey,
string postid,
string username,
string password,
bool publish);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="postid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="content"></param>
/// <param name="publish"></param>
/// <returns></returns>
[OperationContract(Action="blogger.editPost")]
bool blogger_editPost(
string appKey,
string postid,
string username,
string password,
string content,
bool publish);
/// <summary>
///
/// </summary>
/// <param name="blogid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <returns></returns>
[OperationContract(Action="blogger.getCategories")]
Category[] blogger_getCategories(
string blogid,
string username,
string password);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="postid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.getPost")]
Post blogger_getPost(
string appKey,
string postid,
string username,
string password);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="blogid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="numberOfPosts"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.getRecentPosts")]
Post[] blogger_getRecentPosts(
string appKey,
string blogid,
string username,
string password,
int numberOfPosts);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="blogid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="templateType"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.getTemplate")]
string blogger_getTemplate(
string appKey,
string blogid,
string username,
string password,
string templateType);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.getUserInfo")]
UserInfo blogger_getUserInfo(
string appKey,
string username,
string password);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.getUsersBlogs")]
BlogInfo[] blogger_getUsersBlogs(
string appKey,
string username,
string password);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="blogid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="content"></param>
/// <param name="publish"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.newPost")]
string blogger_newPost(
string appKey,
string blogid,
string username,
string password,
string content,
bool publish);
/// <summary>
///
/// </summary>
/// <param name="appKey"></param>
/// <param name="blogid"></param>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="template"></param>
/// <param name="templateType"></param>
/// <returns></returns>
[OperationContract(Action = "blogger.setTemplate")]
bool blogger_setTemplate(
string appKey,
string blogid,
string username,
string password,
string template,
string templateType);
}
}
|