How should I handle ownership of a web API wrapper client object?
the StacMan library from StackExchange allows seamless interaction with the site from a clean C # environment (with the exception, apparently, of the authentication that passes through the web page, if I'm not mistaken). It provides a client object through which all API methods can be called:
var client = new StacManClient(key: "my-app-key", version: "2.1");
var response = await client.Questions.GetAll("stackoverflow",
page: 1,
pagesize: 10,
sort: Questions.AllSort.Creation,
order: Order.Desc,
filter: "!mDO35lQRaz");
foreach (var user in response.Data.Items)
{
Console.WriteLine(question.Title);
}
, ? - , , , API. , - ( obejct API), , #. ++ (RAII, ..).