There is one other option, using a sandboxed solution and adding it to the solution gallery. But high chance this feature will dissapear in the future.
EDIT: Now that I think about it, in the previous thread, there was mention of a Web Proxy. I guess this better fits your requirements.
If you want to do a basic C# call to SharePoint, just follow this: Make a RESTful API Call to SharePoint Online from Console program
Replace the List call with KQL call as described here: https://msdn.microsoft.com/en-us/library/office/jj163876.aspx