@epdomains/periscopespace
v1.3.2
Published
Fetch Public Periscope Spaces metadata
Downloads
4
Maintainers
Readme
twspaces
Fetch Twitter Spaces metadata without your tokens
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);