https://github.com/ansango/lastfm-client-ts
A node ts lastfm client api
https://github.com/ansango/lastfm-client-ts
Last synced: 8 months ago
JSON representation
A node ts lastfm client api
- Host: GitHub
- URL: https://github.com/ansango/lastfm-client-ts
- Owner: ansango
- Created: 2023-03-06T00:07:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T22:58:18.000Z (over 3 years ago)
- Last Synced: 2025-01-02T15:48:49.498Z (over 1 year ago)
- Language: TypeScript
- Size: 180 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lastfm-client-ts
[](https://www.npmjs.com/package/lastfm-client-ts)
[](https://www.npmjs.com/package/lastfm-client-ts)
[](https://opensource.org/licenses/MIT)
## Table of Contents
- [lastfm-client-ts](#lastfm-client-ts)
- [Table of Contents](#table-of-contents)
- [About ](#about-)
- [Getting Started ](#getting-started-)
- [Installing](#installing)
- [Usage](#usage)
- [Environment Variables](#environment-variables)
- [Fullytyped](#fullytyped)
- [Contributing](#contributing)
Last.fm API client for Node.js
### Installing
```bash
npm install lastfm-client-ts
```
### Usage
```typescript
import { lastFmClient } from "lastfm-client-ts";
const {
userApiMethods,
albumApiMethods,
artistApiMethods,
chartApiMethods,
geoApiMethods,
libraryApiMethods,
tagApiMethods,
trackApiMethods,
} = lastFmClient();
export default async function handler() {
const response = userApiMethods.getInfo({
user: "ansango",
});
return {
response,
};
}
```
### Environment Variables
To run this project, you will need to add the following environment variables to your .env file
- `LASTFM_API_BASE_URL=http://ws.audioscrobbler.com/2.0/`
- `LASTFM_USER=`
- `LASTFM_API_KEY=`
- `LASTFM_APPNAME=`
### Fullytyped
This project is fully typed with TypeScript.
## Contributing
Contributions are always welcome!