UserID とパスワードを使用して、特定のユーザーのすべてのブログからデータを取得する ac# コンソール アプリを作成しています。
だから私は以下のコードを見つけました--->
using Google.GData.Blogger;
using Google.GData.Client;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
Service service = new Service("blogger", "blogger-example");
// ClientLogin using username/password authentication
string username;
string password;
if (args.Length != 2)
{
Console.WriteLine("Usage: BloggerDevSample.exe <username> <password>");
return;
}
else
{
username = args[0];
password = args[1];
}
service.Credentials = new GDataCredentials(username, password);
ListUserBlogs(service);
Console.WriteLine("Press enter to quit");
Console.ReadLine();
}
static void ListUserBlogs(Service service)
{
Console.WriteLine("\nRetrieving a list of blogs");
FeedQuery query = new FeedQuery();
// Retrieving a list of blogs
query.Uri = new Uri("http://www.blogger.com/feeds/default/blogs");
AtomFeed feed = null;
feed = service.Query(query);
foreach (AtomEntry entry in feed.Entries)
{
Console.WriteLine(" Blog title: " + entry.Title.Text);
}
}
}
}
現在、ユーザー名とパスワードを使用してデータを取得していますが、これは知っておく必要がありますが、特定のブログの URL を使用してブログ データを取得したいので、非公開の資格情報 (ユーザー名とパスワード) がなくてもブログ データにアクセスでき
ます。ブログのURLです。これはゴーグルが提供するいくつかのAPIで実現できると思いますが、どうすれば???