Important
This repo is for educational and experimental use only. It uses non-public APIs and may violate Warpcast policies. Not recommended for production or consumer products. Use at your own risk.
Important
This project is currently under development and considered unstable. Significant changes may occur, and functionality is not guaranteed at this stage.
Install the package using your preferred package manager:
npm install @nekofar/warpcastFirst, import and configure the client with your API credentials:
import { client } from '@nekofar/warpcast';
client.setConfig({
baseUrl: 'https://api.warpcast.com',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});Retrieve user information by username:
import { getUserByUsername } from '@nekofar/warpcast';
const user = await getUserByUsername({
query: { username: 'nekofar' }
});
console.log(user.data); // User profile informationFetch items from a user's feed:
import { getFeedItems } from '@nekofar/warpcast';
const feed = await getFeedItems({
query: { feedType: 'following', limit: 25 }
});
console.log(feed.data); // Array of feed itemsPost a new cast to Warpcast:
import { createCast } from '@nekofar/warpcast';
const cast = await createCast({
body: {
text: 'Hello Warpcast!',
embeds: []
}
});
console.log(cast.data); // Created cast details