Camphouse.js
Camphouse.js is a Node.js package that provides a convenient interface to interact with the Camphouse API. It allows you to authenticate, fetch posts, create posts, and handle various interactions with the Camphouse platform.
Installation
npm install camphouse
Usage
const { CamphouseClient } = require('camphouse');
const client = new CamphouseClient();
client.on('ready', () => {
console.log('Logged in as Camphouse bot!');
});
client.on('newPosts', (newPosts) => {
console.log('New posts detected:', newPosts);
});
client.on('postCreated', (newPost) => {
console.log('New post created:', newPost);
});
client.on('ping', async (interaction) => {
await interaction.reply('Pong!');
});
client.login('email@example.com', 'password');
Features
- Authentication: Authenticate using your Camphouse credentials.
- Post Management:
- Fetch posts
- Create new posts
- Event Handling:
- Register event handlers for ready, new posts, post created, etc.
- Command Handling:
- Register commands and handle interactions with ease.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
This package is licensed under the MIT License - see the LICENSE file for details.