I’m trying to access the Scoop.it API via C# to retrieve posts in topics. It’s pretty much straight forward, in PHP, how are objects managed in C# and how to you access the properties?
Here’s the php code which i’d like to get a C# equivalent of:
$topic = $scoop->topic(24001);
foreach($topic->curatedPosts as $post)
{
echo $post->title;
}
I couldn’t find an API reference for
Scoop.itin C#, but I would imagine that they conform to the naming standards in C#.So the PHP code converted to C# would looke like this:
However
echoin PHP prints something out to the web-page, so I would imagine that you want to replaceConsole.WriteLinewithResponse.Write.If you have a class that looks like this, where
Nameis a property:Then you would create an instance of
Topiclike this:var topic = new Topic();Now you can access the property
Namelike this:topic.Name