1.0.2 • Published 2 years ago
camphouse.js v1.0.2
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 camphouseUsage
const { CamphouseClient } = require('camphouse');
const client = new CamphouseClient();
// Register event handlers
client.on('ready', () => {
console.log('Logged in as Camphouse bot!');
});
client.on('newPosts', (newPosts) => {
console.log('New posts detected:', newPosts);
// Handle new posts here
});
client.on('postCreated', (newPost) => {
console.log('New post created:', newPost);
// Handle newly created posts here
});
client.on('ping', async (interaction) => {
await interaction.reply('Pong!');
});
// Login with your Camphouse credentials
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.