This package provides a small and simple client to fetch public events from the ABOSS API. ABOSS is a platform for artist, managers and booking agents.
To install, use one of the following commands:
npm install aboss-events
yarn add aboss-events
pnpm add aboss-events
First, import the createClient
function from the package:
import { createClient } from 'aboss-api-client';
Create a client instance by providing the required configuration parameters:
const client = createClient({
agencyId: 'your_agency_id', // Optional
artistId: 'your_artist_id', // Required
token: 'your_api_token', // Required
});
Fetch public events by calling the publicEvents
method on the client instance. You can optionally pass a date range:
const allEvents = await client.publicEvents();
const eventsIn2024 = await client.publicEvents({
from: new Date('2024-01-01'),
to: new Date('2024-12-31'),
});
Creates and returns an ABOSS API client. Reference the ABOSS API documentation for more information about finding your token. Please keep in mind that if the token is from an agency account, you must also provide the agency ID.
-
config
: An object containing the client configuration.-
agencyId
(optional): The ID of the agency. -
artistId
(required): The ID of the artist. -
token
(required): The API token for authentication.
-
Fetches public events for the configured artist. Note that both the from
and to
parameters should be provided if you want to filter events by date range. This is a limitation of the ABOSS API.
-
options
(optional): An object to specify the date range for events.-
from
: The start date for the event range (inclusive). -
to
: The end date for the event range (inclusive).
-
A promise that resolves to an array of events. The Event object is fully typed according to the ABOSS API documentation.
Contributions, whether in the form of code enhancements, bug fixes, or documentation, are always welcome! Here are the steps to get started:
- Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project.
- Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop.
- Create a new branch with a descriptive name (e.g.,
new-feature-branch
orbugfix-issue-123
).
git checkout -b new-feature-branch
- Make changes to the project's codebase.
- Commit your changes to your local branch with a clear conventional commit message that explains the changes you've made.
git commit -m 'feat: Implemented new feature.'
- Push your changes to your forked repository on GitHub using the following command
git push origin new-feature-branch
- Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they are necessary. Make sure to update or add documentation and test as relevant. I will review your changes, provide feedback, or merge them into the main branch.
MIT © Wannes Salomé