mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
chore(api): update dependencies
This commit is contained in:
parent
05f230a7ce
commit
d881a78757
37 changed files with 4804 additions and 2700 deletions
|
|
@ -6,11 +6,11 @@ import { SpotifyApiService } from "./spotify-api.service";
|
|||
HttpModule.registerAsync({
|
||||
useFactory: () => ({
|
||||
timeout: 5000,
|
||||
baseURL: "https://api.spotify.com/"
|
||||
})
|
||||
})
|
||||
baseURL: "https://api.spotify.com/",
|
||||
}),
|
||||
}),
|
||||
],
|
||||
providers: [SpotifyApiService],
|
||||
exports: [SpotifyApiService]
|
||||
exports: [SpotifyApiService],
|
||||
})
|
||||
export class SpotifyApiModule {}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { SpotifyApiService } from './spotify-api.service';
|
||||
import { Test, TestingModule } from "@nestjs/testing";
|
||||
import { SpotifyApiService } from "./spotify-api.service";
|
||||
|
||||
describe('SpotifyApiService', () => {
|
||||
describe("SpotifyApiService", () => {
|
||||
let service: SpotifyApiService;
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
@ -12,7 +12,7 @@ describe('SpotifyApiService', () => {
|
|||
service = module.get<SpotifyApiService>(SpotifyApiService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
it("should be defined", () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ export class SpotifyApiService {
|
|||
|
||||
async getRecentlyPlayedTracks({
|
||||
accessToken,
|
||||
lastRefreshTime
|
||||
lastRefreshTime,
|
||||
}: SpotifyConnection): Promise<PlayHistoryObject[]> {
|
||||
console.log("SpotifyApiService#getRecentlyPlayedTracks");
|
||||
|
||||
const parameters: { limit: number; after?: number } = {
|
||||
limit: 50
|
||||
limit: 50,
|
||||
};
|
||||
|
||||
if (lastRefreshTime) {
|
||||
|
|
@ -33,7 +33,7 @@ export class SpotifyApiService {
|
|||
const history = await this.httpService
|
||||
.get<PagingObject<PlayHistoryObject>>(`v1/me/player/recently-played`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
params: parameters
|
||||
params: parameters,
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ export class SpotifyApiService {
|
|||
console.log("SpotifyApiService#getArtist");
|
||||
const artist = await this.httpService
|
||||
.get<ArtistObject>(`v1/artists/${spotifyID}`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` }
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ export class SpotifyApiService {
|
|||
|
||||
const album = await this.httpService
|
||||
.get<AlbumObject>(`v1/albums/${spotifyID}`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` }
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ export class SpotifyApiService {
|
|||
|
||||
const track = await this.httpService
|
||||
.get<TrackObject>(`v1/tracks/${spotifyID}`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` }
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue