Adding api functionality to csharp