Page 1 of 1

LinkedIn API in Gambas?

Posted: Saturday 21st September 2019 9:51am
by tincho
Hello everyone.
I found a small job sending invitations to conventions and updating a database with the answers etc.
The case is a rather repetitive and boring work, so I thought maybe it could be automated.
I started looking and found a python-made library that apparently serves to operate with the api of this social network.
https://github.com/ozgur/python-linkedin
How to use this from gambas?
Do you think it can be translated into native gambas code?
Any other suggestions for working with the LinkedIn API?
Regards.

Re: LinkedIn API in Gambas?

Posted: Saturday 21st September 2019 9:49pm
by jornmo
Hi There!

I would take a look at the source code and what libraries it imports for a start.
Then, try to see if there are equivalents in the gambas component repository.
If you cannot find it there, you probably need to invoce some external software through Shell.

Just taking a glance at it, it seems to be build upon hashing, url requests and the OAuht1 protocoll...
The last one I'm not sure about, but the two first might be able to replicate natively in Gambas.

Re: LinkedIn API in Gambas?

Posted: Sunday 22nd September 2019 11:46am
by cogier
I had a quick look and noticed it returned JSON files which is handled within Gambas.

I wrote a program that uses an external API to return a CSV files here that may help. The component gb.net.curl should have the tools you need.

Re: LinkedIn API in Gambas?

Posted: Sunday 22nd September 2019 4:23pm
by tincho
jornmo wrote: Saturday 21st September 2019 9:49pm...and the OAuht1 protocoll...
The last one I'm not sure about, but the two first might be able to replicate natively in Gambas.
A good reasoning.
I'm trying to access the API for the minimum and indispensable but I don't get access.
The protocol is now Auth v2
Tanks

Re: LinkedIn API in Gambas?

Posted: Sunday 22nd September 2019 4:38pm
by tincho
cogier wrote: Sunday 22nd September 2019 11:46am...I wrote a program that uses an external API to ...
I downloaded it and read the code. It will surely be very useful once I get the information from the linkein API.
At the moment I have not passed the first stage of communicating with the API.
Tanks.

Re: LinkedIn API in Gambas?

Posted: Sunday 22nd September 2019 6:59pm
by jornmo
This Python OAuth library seems to be revolving around the urllib:
https://github.com/oauthlib/oauthlib/tr ... r/oauthlib

So, in theory - creating your own should be doable. A bit tough, but doable :)