Merge master into user play stats branch
Some checks failed
CI / verify (pull_request) Has been cancelled
Some checks failed
CI / verify (pull_request) Has been cancelled
This commit is contained in:
@@ -46,7 +46,24 @@ export async function deleteBigFishWork(sessionId: string) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录已发布大鱼吃小鱼作品的一次正式进入。
|
||||
*/
|
||||
export async function recordBigFishWorkPlay(sessionId: string) {
|
||||
return requestJson<BigFishWorksResponse>(
|
||||
`${BIG_FISH_WORKS_API_BASE}/${encodeURIComponent(sessionId)}/play`,
|
||||
{
|
||||
method: 'POST',
|
||||
},
|
||||
'记录大鱼吃小鱼游玩次数失败',
|
||||
{
|
||||
retry: BIG_FISH_WORKS_WRITE_RETRY,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export const bigFishWorksClient = {
|
||||
delete: deleteBigFishWork,
|
||||
list: listBigFishWorks,
|
||||
recordPlay: recordBigFishWorkPlay,
|
||||
};
|
||||
|
||||
@@ -2,4 +2,5 @@ export {
|
||||
bigFishWorksClient,
|
||||
deleteBigFishWork,
|
||||
listBigFishWorks,
|
||||
recordBigFishWorkPlay,
|
||||
} from './bigFishWorksClient';
|
||||
|
||||
@@ -11,6 +11,7 @@ import type {
|
||||
ProfileSaveArchiveResumeResponse,
|
||||
ProfileWalletLedgerResponse,
|
||||
RedeemProfileReferralInviteCodeResponse,
|
||||
RedeemProfileRewardCodeResponse,
|
||||
RuntimeSettings,
|
||||
} from '../../../packages/shared/src/contracts/runtime';
|
||||
import { rehydrateSavedSnapshot } from '../../persistence/runtimeSnapshot';
|
||||
@@ -125,6 +126,22 @@ export function redeemRpgProfileReferralInviteCode(
|
||||
);
|
||||
}
|
||||
|
||||
export function redeemRpgProfileRewardCode(
|
||||
code: string,
|
||||
options: RuntimeRequestOptions = {},
|
||||
) {
|
||||
return requestRpgRuntimeJson<RedeemProfileRewardCodeResponse>(
|
||||
'/profile/redeem-codes/redeem',
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ code }),
|
||||
},
|
||||
'兑换失败',
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
export function getRpgProfilePlayStats(options: RuntimeRequestOptions = {}) {
|
||||
return requestRpgRuntimeJson<ProfilePlayStatsResponse>(
|
||||
'/profile/play-stats',
|
||||
|
||||
Reference in New Issue
Block a user