@leonardssh/use-lanyard
v1.0.4
Published
π Lanyard with Composition API for Vue
Downloads
126
Maintainers
Readme
Remember to π this Github if you π it.
π¦ Installation
- Using yarn:
yarn add @leonardssh/use-lanyard
- Using npm:
npm i @leonardssh/use-lanyard
- Using pnpm:
pnpm add @leonardssh/use-lanyard
π€ Usage
β¨ This plugin supports both REST and WebSocket methods.
Using without websocket:
import { useLanyard } from '@leonardssh/use-lanyard';
const { success, data, error } = await useLanyard({
userId: 'USER_ID'
});
Using with websocket:
import { useLanyard, LanyardData } from '@leonardssh/use-lanyard';
await useLanyard({
userId: 'USER_ID',
socket: true,
onPresenceUpdate(presence: LanyardData) {
...
}
});
π Thanks
- Phineas - Creator of Lanyard API
- barbarbar338 - Creator of react-use-lanyard
- eggsy - Creator of vue-lanyard
π¨βπ» Contributing
To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.
- Fork / Clone and select the
main
branch. - Create a new branch in your fork.
- Make your changes.
- Commit your changes, and push them.
- Submit a Pull Request here!
π License
This project is licensed under the MIT License - see the LICENSE file for details.