forked from openforge/capacitor-game-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.ts
74 lines (67 loc) · 1.75 KB
/
web.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import { WebPlugin } from '@capacitor/core';
import type { CapacitorGameConnectPlugin } from './definitions';
export class CapacitorGameConnectWeb
extends WebPlugin
implements CapacitorGameConnectPlugin
{
/**
* * Method to sign-in a user to Google Play Services
*
*/
async signIn(): Promise<void> {
return Promise.resolve();
}
/**
* Method to display the Leaderboards view from Google Play Services SDK
*
* @param leaderboardID as string
*/
async showLeaderboard(options: { leaderboardID: string }): Promise<void> {
console.info('showLeaderboard function has been called', options);
return Promise.resolve();
}
/**
* * Method to submit a score to the Google Play Services SDK
*
* @returns Promise
*/
async submitScore(options: {
leaderboardID: string;
totalScoreAmount: number;
}): Promise<void> {
console.info('submitScore function has been called', options);
return Promise.resolve();
}
/**
* * Method to display the Achievements view from Google Play SDK
*
* @returns Promise
*/
async showAchievements(): Promise<void> {
return Promise.resolve();
}
/**
* * Method to unlock an achievement
*
* @returns Promise
*/
async unlockAchievement(options: { achievementID: string }): Promise<void> {
console.info('unlockAchievement function has been called', options);
return Promise.resolve();
}
/**
* * Method to increment the progress of an achievement
*
* @returns Promise
*/
async incrementAchievementProgress(options: {
achievementID: string;
pointsToIncrement: number;
}): Promise<void> {
console.info(
'incrementAchievementProgress function has been called',
options,
);
return Promise.resolve();
}
}