1.0.12 • Published 4 years ago

botometer v1.0.12

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

Build status

Botometer

A simple and tiny library to get botometer scores.

Installing

npm install botometer

Using

const { Botometer } = require("botometer");

const botometer = new Botometer({
  consumerKey: "<consumerKey>",
  consumerSecret: "<consumerSecret>",
  accessToken: "<accessToken>",
  accessTokenSecret: "<accessTokenSecret>",
  rapidApiKey: "<rapidApiKey>",
  supressLogs: false, // Not required. Defaults to true
});

async function run() {
  const results = await botometer.getScores(["@aandreyluiz"]);

  console.log(results);
}

run();

The console.log will yield something like:

[
  {
    cap: { english: 0.22851217352302083, universal: 0.22121616027906205 },
    categories: {
      content: 0.6044735474026068,
      friend: 0.27037007428252813,
      network: 0.2350108345196892,
      sentiment: 0.7640015609838375,
      temporal: 0.47574717852253456,
      user: 0.8819524564335114,
    },
    display_scores: {
      content: 3,
      english: 3.3,
      friend: 1.4,
      network: 1.2,
      sentiment: 3.8,
      temporal: 2.4,
      universal: 3.3,
      user: 4.4,
    },
    scores: { english: 0.6506901031179089, universal: 0.6545596461071505 },
    user: {
      // ...
      name: "Andrey Luiz",
      screen_name: "aandreyluiz",
      // ...
    },
  },
];

If you get null results in your array, set supressLogs to false so you can see the errors along the process.

Credits

Botometer

My deep thanks to the guys from the Botometer project from the Observatory of Social Media at Indiana University.

1.0.11

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago