{
public class HatenaFotolife
{
- private string userName;
- private string password;
-
- public HatenaFotolife(string userName, string password)
- {
- this.userName = userName;
- this.password = password;
- }
+ public string UserName { set; get; }
+ public string Password { set; get; }
public FotolifeEntry Upload(string title, string fileName, string folder = null)
{
"http://f.hatena.ne.jp/atom/post",
new XDocument(entry),
Encoding.GetEncoding("shift_jis"),
- this.userName,
- this.password);
+ this.UserName,
+ this.Password);
return new FotolifeEntry(reXml.Root);
}
WsseAtomConnection.Get(
"http://f.hatena.ne.jp/atom/edit/" + id,
Encoding.UTF8,
- this.userName,
- this.password
+ this.UserName,
+ this.Password
)
.Root
);
.ToString()
),
null,
- this.userName,
- this.password);
+ this.UserName,
+ this.Password);
}
public void DeleteEntry(string id)
{
WsseAtomConnection.Delete(
"http://f.hatena.ne.jp/atom/edit/" + id,
- this.userName,
- this.password);
+ this.UserName,
+ this.Password);
}
public IEnumerable<FotolifeEntry> GetEntrys(int page = 1)
return WsseAtomConnection.Get(
"http://f.hatena.ne.jp/atom/feed?page=" + page.ToString(),
Encoding.UTF8,
- this.userName,
- this.password
+ this.UserName,
+ this.Password
)
.Root
.Elements(XmlNamespaces.Atom02Spec + "entry")