Skip to content

Commit

Permalink
chore: rename backtrack/spotistats to stats.fm (+ 1.7.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
stingalleman committed Feb 3, 2022
1 parent cc24f15 commit 632e97c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# spotify.js

[![CI](https://github.com/backtrackapp/spotify.js/actions/workflows/lint.yml/badge.svg)](https://github.com/backtrackapp/spotify.js/actions/workflows/lint.yml)
[![CI](https://github.com/statsfm/spotify.js/actions/workflows/lint.yml/badge.svg)](https://github.com/statsfm/spotify.js/actions/workflows/lint.yml)

An API wrapper for Spotify, written in Typescript. Made for [Spotistats for Spotify](https://spotistats.app/).
An API wrapper for Spotify, written in Typescript. Made for [Stats.fm (formerly known as Spotistats for Spotify](https://stats.fm/).

[Documentation](https://spotify.js.org/).

Expand All @@ -17,13 +17,13 @@ An API wrapper for Spotify, written in Typescript. Made for [Spotistats for Spot

```bash
# using yarn
yarn add @spotistats/spotify.js
yarn add @statsfm/spotify.js
# or with npm
npm install @spotistats/spotify.js
npm install @statsfm/spotify.js
```

```ts
import { SpotifyAPI } from '@spotistats/spotify.js';
import { SpotifyAPI } from '@statsfm/spotify.js';

const api = new SpotifyAPI({
clientCredentials: {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@spotistats/spotify.js",
"version": "1.7.0",
"name": "@statsfm/spotify.js",
"version": "1.7.1",
"description": "Node wrapper for Spotify, written in TS.",
"main": "dist/index.js",
"private": false,
"publishConfig": {
"access": "public"
},
"repository": "https://github.com/spotistatsapp/spotify.js",
"repository": "https://github.com/statsfm/spotify.js",
"author": "Sting Alleman <[email protected]>",
"license": "GPL-3.0",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface SpotifyConfig {
*/
proxy?: AxiosProxyConfig;
/**
* Set a custom user agent. Default: "spotify.js/<version> https://github.com/backtrackapp/spotify.js".
* Set a custom user agent. Default: "spotify.js/<version> https://github.com/statsfm/spotify.js".
*/
userAgent?: string;
/**
Expand Down
4 changes: 3 additions & 1 deletion src/lib/http/HttpManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
RatelimitError
} from '../../interfaces/Errors';
import { PrivateConfig, SpotifyConfig } from '../../interfaces/Config';
import pkgJson from '../../../package.json';

export class HttpClient {
protected baseURL = 'https://api.spotify.com/v1';
Expand Down Expand Up @@ -214,7 +215,8 @@ export class HttpClient {
// 'Content-Type': 'application/json',
// Accept: 'application/json',
'User-Agent':
this.config.http?.userAgent || 'spotify.js https://github.com/backtrackapp/spotify.js',
this.config.http?.userAgent ||
`spotify.js/${pkgJson.version} https://github.com/statsfm/spotify.js`,
...config.headers
};

Expand Down

0 comments on commit 632e97c

Please sign in to comment.