Custom News Provider Example
Hello,
My company partners with a news curator who has an API available to retrieve articles via REST calls. I'd like to show these in Sitefinity with our other articles in the news widget, but I don't actually need to persist them in the database.
Is it possible to create a "read-only" news provider to integrate with Sitefinity? If so, does anyone have a complete example? Or do you think it would be easier/better to simply build a custom control that pulls from both places?
Thanks!
Might be a appropriate to build a MVC widget where the controller grabs from both APIs and creates a common Model of the two.
Thanks Jonathan, that's what I ended up doing.
I still think it would be helpful to have an example of a complete custom news provider, so if anyone stumbles across this thread and has one to share I'd appreciate it.
I think what you probably want is a custom pipe. You can create a custom pull pipe with pass through to the publishing point. Using a pull pipe with pass through, you can display external data (such as an RSS feed) but don't persist the data in the database. This blog post has an example project attached that demonstrates what's involved in creating a custom pipe. Custom Pipe Example. The example project isn't all that similar to what you're trying to do, but hopefully there's enough general info on custom pipe implementation for you to see if it would work for your needs and what would be involved.