Using Javascript SDK in my VB.NET Console application

NicolaiL

New member
Joined
May 24, 2013
Messages
3
Programming Experience
Beginner
I'd like to be able to incorporate a 3rd party JS SDK in my console appliacation, but I can't figure out how to set up the references to the SDK (or perhaps this is not possible?).

So far no luck googling for answers, so posting here in the hope that someone can point me in the right direction?
 
You can only add a reference to your project for a .NET assembly or a COM library. If your SDK doesn't include one of those then there's no reference to be added. If you were to actually explain what you have in more detail than "3rd party JS SDK" then we may be able to be more specific.
 
Thanks for responding. Perhaps the term SDK is a little misleading, but that is what (Neato) the supplier was using. Essentially they have a bunch of ready to use JS that would allow me to log into their service (OAuth2), and control the robovac.

I'm aiming to write a third-party integration to homeautomation, as a console application in vb.net, and rather than re-invent the wheel, I would like to use the JS that Neato have provided.

As an example they state:
Setup

In order to use the Neato SDK JS simply import the jQuery and hmac-sha256 dependencies and the neato-x.y.z.min.js file:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/hmac-sha256.js"></script>
<script src="../lib/neato-0.7.0.min.js"></script>

...

2. Start the authentication flow


To start the authentication flow simply invoke the login() method on the user object passing the above data:
var user = new Neato.User();
user.login({
clientId: "your_app_client_id",
scopes: "control_robots+email",
redirectUrl: "your_redirect_uri"
});

etc. etc.

So essentially all the relevant snippets are provided if only I could find a way to call them from my vb.net (console) application.
 
Why would anyone ever want to use JS in a console app, console apps have nothing to do with internet things inherently and have nothing to do with web browsers either.
Since this script you're using has the ability to log into something & since all JS is plain text, why don't you go through their libraries and see how the login part works, then replicate that in .Net code?
 

Latest posts

Back
Top