Skip to content

Commit

Permalink
[expo] deprecate UPFCSiteScraper
Browse files Browse the repository at this point in the history
**Summary**

up-fc.jp is now deprecated. we use only upfc.jp (UPFC2*) scraper.

**Test**

- yarn test

**Issue**

- N/A
  • Loading branch information
yssk22 committed Dec 22, 2024
1 parent bf8a11e commit 4f46ab8
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 7,169 deletions.
7 changes: 1 addition & 6 deletions expo/features/upfc/internals/useUPFCEventApplications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ import {
UPFC2SiteScraper,
UPFCDemoScraper,
UPFCEventApplicationTickets,
UPFCHttpFetcher,
UPFCSite,
UPFCSiteScraper,
UPFCCombiedSiteScraper,
UPFCEventTicket,
UPFCTicketApplicationStatus
} from '@hpapp/features/upfc/scraper';
Expand Down Expand Up @@ -112,9 +109,7 @@ export default function useUPFCEventApplications(): ReloadableAysncResult<
}

const demoScraper = new UPFCDemoScraper();
const siteScraper = new UPFCSiteScraper(new UPFCHttpFetcher());
const siteScraper2 = new UPFC2SiteScraper(new UPFC2HttpFetcher());
const combinedScraper = new UPFCCombiedSiteScraper([siteScraper2, siteScraper]);

async function fetchApplications({
helloproject,
Expand Down Expand Up @@ -157,7 +152,7 @@ async function fetchApplicationsFromSite(
error: Error | undefined;
applications: UPFCEventApplicationTickets[];
}> {
const scraper = useDemo || username === UPFCDemoScraper.Username ? demoScraper : combinedScraper;
const scraper = useDemo || username === UPFCDemoScraper.Username ? demoScraper : siteScraper2;
if (isEmpty(username)) {
return {
error: new ErrUPFCNoCredential(),
Expand Down
11 changes: 1 addition & 10 deletions expo/features/upfc/scraper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@ import UPFC2HttpFetcher from './internals/UPFC2HttpFetcher';
import UPFC2SiteScraper from './internals/UPFC2SiteScraper';
import UPFCCombiedSiteScraper from './internals/UPFCCombinedSiteScraper';
import UPFCDemoScraper from './internals/UPFCDemoScraper';
import UPFCHttpFetcher from './internals/UPFCHttpFetcher';
import UPFCSiteScraper from './internals/UPFCSiteScraper';

export * from './internals/types';
export * from './internals/errors';

export {
UPFCDemoScraper,
UPFCCombiedSiteScraper,
UPFCSiteScraper,
UPFCHttpFetcher,
UPFC2SiteScraper,
UPFC2HttpFetcher
};
export { UPFCDemoScraper, UPFCCombiedSiteScraper, UPFC2SiteScraper, UPFC2HttpFetcher };
68 changes: 0 additions & 68 deletions expo/features/upfc/scraper/internals/UPFCHttpFetcher.ts

This file was deleted.

192 changes: 0 additions & 192 deletions expo/features/upfc/scraper/internals/UPFCSiteScraper.test.ts

This file was deleted.

Loading

0 comments on commit 4f46ab8

Please sign in to comment.