Skip to content

Commit

Permalink
remove getChatRoomsForChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
d-fischer committed Dec 15, 2020
1 parent 7f2db3a commit 6f94afc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 102 deletions.
18 changes: 0 additions & 18 deletions packages/twitch/src/API/Kraken/Chat/ChatApi.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import { Cacheable, Cached } from '@d-fischer/cache-decorators';
import { rtfm } from 'twitch-common';
import type { UserIdResolvable } from '../../../Toolkit/UserTools';
import { extractUserId } from '../../../Toolkit/UserTools';
import { BaseApi } from '../../BaseApi';
import type { ChatEmoteData } from './ChatEmote';
import { ChatEmoteList } from './ChatEmoteList';
import type { ChatRoomData } from './ChatRoom';
import { ChatRoom } from './ChatRoom';

/**
* The API methods that deal with chat and chatrooms.
Expand Down Expand Up @@ -42,18 +38,4 @@ export class ChatApi extends BaseApi {

return new ChatEmoteList(data.emoticons);
}

/**
* Retrieves a list of chat rooms for a given channel.
*
* @param channel The channel to retrieve the chat rooms of.
*/
@Cached(3600)
async getChatRoomsForChannel(channel: UserIdResolvable): Promise<ChatRoom[]> {
const data = await this._client.callApi<{ rooms: ChatRoomData[] }>({
url: `chat/${extractUserId(channel)}/rooms`
});

return data.rooms.map(room => new ChatRoom(room, this._client));
}
}
83 changes: 0 additions & 83 deletions packages/twitch/src/API/Kraken/Chat/ChatRoom.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/twitch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export { PrivilegedChannel } from './API/Kraken/Channel/PrivilegedChannel';

export { ChatEmote } from './API/Kraken/Chat/ChatEmote';
export { ChatEmoteList } from './API/Kraken/Chat/ChatEmoteList';
export { ChatRoom } from './API/Kraken/Chat/ChatRoom';

export { Stream, StreamType } from './API/Kraken/Stream/Stream';

Expand Down

0 comments on commit 6f94afc

Please sign in to comment.