Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tweespaces

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tweespaces - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

5

package.json
{
"name": "tweespaces",
"description": "Lookup Twitter spaces by keyword",
"version": "0.0.20",
"version": "0.0.21",
"license": "MIT",

@@ -42,4 +42,2 @@ "bin": {

"cli-welcome": "^2.2.2",
"cross-env": "^7.0.3",
"crypto-js": "^4.1.1",
"dotenv": "^10.0.0",

@@ -49,3 +47,2 @@ "lodash.merge": "^4.6.2",

"node-emoji": "^1.11.0",
"node-env-run": "^4.0.2",
"node-fetch": "^2.6.1"

@@ -52,0 +49,0 @@ },

29

utils/find-space.js

@@ -7,6 +7,3 @@ require('dotenv').config();

const emoji = require('node-emoji')
const CryptoJS = require("crypto-js");
const SPACES_URL = 'https://api.twitter.com/2/spaces/search?query=';
module.exports = async ({

@@ -18,28 +15,10 @@ scheduled,

const bearer = await fetch('https://tweespaces-serverless-function.vercel.app/api/bearer');
const bearerResult = await bearer.json();
const state = scheduled ? 'scheduled' : live ? 'live' : 'live'
const response = await fetch(`https://tweespaces-serverless-function.vercel.app/api/spaces?state=${state}`);
const result = await response.json();
const url = `${SPACES_URL}${query}&state=${state}&space.fields=participant_count,scheduled_start,title&expansions=creator_id&user.fields=name,description,username`;
const spinner = new Spinner(dim('Searching for spaces.....'));
const spinner = new Spinner('Searching for spaces....');
spinner.start();
spinner.start(dim('Searching for spaces.....'));
const decryptWithAES = (stringToDecrypt) => {
const bytes = CryptoJS.AES.decrypt(stringToDecrypt, 'Magpienemo@011210');
const originalText = bytes.toString(CryptoJS.enc.Utf8);
return originalText;
};
const response = await fetch(url, {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + decryptWithAES(bearerResult.bearer),
'Content-Type': 'application/json'
},
});
const result = await response.json();
const hasResult = result.meta.result_count !== 0 ? true : false;

@@ -46,0 +25,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc