https://github.com/kusstar/genius-function
A function wraps the genius.com API
https://github.com/kusstar/genius-function
genius serverless vercel
Last synced: 12 months ago
JSON representation
A function wraps the genius.com API
- Host: GitHub
- URL: https://github.com/kusstar/genius-function
- Owner: KusStar
- License: mit
- Created: 2020-11-11T15:16:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-11T15:33:08.000Z (over 5 years ago)
- Last Synced: 2025-03-30T08:32:37.481Z (about 1 year ago)
- Topics: genius, serverless, vercel
- Language: TypeScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# genius-function
> A function wraps the genius.com API.
## Usage
BaseURL: https://genius-function.vercel.app/api
### /artists
Example: https://genius-function.vercel.app/api/artists?id=1985
**id**
ID of the artist
**format**
Format for text bodies related to the document, One or more of `dom`, `plain`, and `html`, separated by `commas`, defaults to `plain`
### /referents
Example: https://genius-function.vercel.app/api/referents?id=2842074
**id**
ID of the referent, only support song_id
**format**
Format for text bodies related to the document, One or more of `dom`, `plain`, and `html`, separated by `commas`, defaults to `plain`
**per_page**
Number of results, defaults to `10`
**page**
Paginated offset, defaults to `1`
### /search
Example: https://genius-function.vercel.app/api/search?q=frank%20ocean
**q**
The term to search for
### /songs
Example: https://genius-function.vercel.app/api/songs?id=2842074
**id**
ID of the song
**format**
Format for text bodies related to the document, One or more of `dom`, `plain`, and `html`, separated by `commas`, defaults to `plain`
## Deploy
1. Get your Genius CLIENT ACCESS TOKEN from [Genius](https://genius.com/api-clients)
2. Clone, deploy the project
```
> git clone https://github.com/KusStar/genius-function
> cd genius-function
> yarn deploy
vercel --prod
```
3. Set up the `ACCESS_TOKEN` to the [Environment Variables](https://vercel.com/docs/build-step#environment-variables) of your project settings
## Thanks
- [Vercel Serverless Functions](https://vercel.com/docs/serverless-functions)
- [axios](https://github.com/axios/axios)
- [Genius API](https://genius.com/developers)
## License
[MIT](LICENSE)