1.3.2 • Published 9 months ago

twspaces v1.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

twspaces

Fetch Twitter Spaces metadata without your tokens

Warning This package no longer works due to changes in X (formerly Twitter) API.

Install

npm i twspaces

API

findSpaceById(spaceId: string): Promise\<AudioSpace>

import { findSpaceById } from "twspaces";

const space = await findSpaceById("<spaceId>");

console.log(space.metadata);

findSpaceByTweetId(tweetId: string): Promise\<AudioSpace>

import { findSpaceByTweetId } from "twspaces";

const space = await findSpaceByTweetId("<tweetId>");

console.log(space.metadata);

findSpaceByUrl(url: string): Promise\<AudioSpace>

import { findSpaceByUrl } from "twspaces";

const spaceBySpaceUrl = await findSpaceByUrl(
  "https://twitter.com/i/spaces/<spaceId>"
);

const spaceByTweetUrl = await findSpaceByUrl(
  "https://twitter.com/<screenName>/status/<tweetId>"
);

getLiveStreamMetadata(mediaKey: string): Promise\<LiveStreamMetadata>

import { findSpaceById, getLiveStreamMetadata } from "twspaces";

const space = await findSpaceById("<spaceId>");

const liveStreamMetadata = await getLiveStreamMetadata(
  space.metadata.media_key
);

console.log(liveStreamMetadata);

License

MIT License

Related

2.0.0-beta.1

12 months ago

2.0.0-beta.0

12 months ago

1.3.2

9 months ago

1.3.1

1 year ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago