Content lives everywhere – WordPress blogs, LinkedIn posts, Instagram feeds. Hazina’s Social Provider system gives you a unified way to import and work with content from any platform.
The Provider Interface
public interface ISocialProvider
{
string ProviderName { get; }
Task<IEnumerable<UnifiedContent>> ImportContentAsync(ImportOptions options);
Task<ContentMetrics> GetMetricsAsync(string contentId);
}
WordPress Provider
var wpProvider = new WordPressProvider(new WordPressConfig {
SiteUrl = "https://yourblog.com",
Username = "admin",
ApplicationPassword = "xxxx xxxx xxxx xxxx"
});
// Import all posts
var posts = await wpProvider.ImportContentAsync(new ImportOptions {
ContentTypes = new[] { "post", "page" },
Since = DateTime.UtcNow.AddMonths(-6),
IncludeMetadata = true
});
foreach (var post in posts)
{
Console.WriteLine($"[{post.PublishedAt:d}] {post.Title}");
Console.WriteLine($" Tags: {string.Join(", ", post.Tags)}");
Console.WriteLine($" Words: {post.WordCount}");
}
Unified Content Model
Regardless of source, all content becomes a UnifiedContent object:
public class UnifiedContent
{
public string Id { get; set; }
public string Source { get; set; } // "wordpress", "linkedin", etc.
public string Title { get; set; }
public string Content { get; set; } // HTML or plain text
public string? Excerpt { get; set; }
public DateTime PublishedAt { get; set; }
public List<string> Tags { get; set; }
public List<ContentMedia> Media { get; set; }
public Dictionary<string, object> Metadata { get; set; }
}
Content Store Integration
Imported content goes directly into the Document Store for RAG:
var store = serviceProvider.GetRequiredService<IUnifiedContentStore>();
// Import and index in one step
await store.ImportAndIndexAsync(wpProvider, new ImportOptions {
ContentTypes = new[] { "post" }
});
// Now you can search across all imported content
var results = await store.SearchAsync("AI automation strategies");
Building Custom Providers
Creating a provider for a new platform is straightforward – implement ISocialProvider and map the platform’s content to UnifiedContent.
In the next post, we’ll look at Content Analysis – how Hazina uses AI to analyze writing style, topics, and sentiment.
Terug naar overzicht