0.0.19 • Published 5 years ago

linkedin-voyager v0.0.19

Weekly downloads
23
License
MIT
Repository
github
Last release
5 years ago

LinkedIn may ban your account if you use this library. Although I can't un-ban your account, please open an issue against this repository if this happens to you. So far, I've only seen this happen while I was trying to get the login-flow correct.

import

yarn add linkedin-voyager

use

import { API, MessageDetails } from 'linkedin-voyager';

const api = new API('email@domain.com');

// You don't actually need to provide a password if you've enabled cookie persistence in
// the 'config' object passed to 'API' assuming it has a valid, non-expired sesssion.
api.setPassword('password1');

// Configure the SDK to echo all messages sent to the account back to the sender.
// This method returns a closure that you can call to remove the listener.
const close = await api.messaging.messages((message: MessageDetails) =>
  api.messaging.sendToConversation(
    `Stupid says "${message.body}"`,
    message.conversationId,
  ),
);

// Wait one hour and then close the stream.
setTimeout(close, 60 * 60 * 1000);

Adding additional API methods is easy but here's what I have so far:

  • Send/receive messages
  • Send/receive message receipts and message typing indicators
  • Query for current conversations
  • Query for current user identifiers

Other cool things which may persuade you to use this SDK instead of its competitors:

  • Fully working login flow
  • Session resumption
  • Cookie persistence
  • Compatible with node and browsers
  • Realtime connections
  • Connection reuse
  • Typescript safe
  • Ephemeral password usage

The SDK does not persist passwords. Provided passwords are maintained in memory.

If you work for LinkedIn, please consider opening your official OAuth-based API for non-partnered developers. This would be ideal for all parties: Clients don't have to provide passwords, LinkedIn can govern fine-grain ACLs and rate limits, and developers would get a better experience. It would also be great if LinkedIn provided a realtime/eventstream endpoint to the official API surface so that developers don't have to resort to shortpolling.

Scott Leland Crossen

http://scottcrossen.com
scottcrossen42@gmail.com

Inspired by https://github.com/tomquirk/linkedin-api/

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.10

5 years ago

0.0.11

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago