MCPcopy Create free account
hub / github.com/MALSync/MALSync / getUserObject

Method getUserObject

src/_provider/Kitsu/list.ts:11–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 authenticationUrl = 'https://kitsu.app/404?mal-sync=authentication';
10
11 async getUserObject() {
12 const user = await this.userRequest();
13
14 const opt = api.settings.get('kitsuOptions');
15 opt.titleLanguagePreference = user.attributes.titleLanguagePreference;
16 opt.sfwFilter = user.attributes.sfwFilter;
17 opt.ratingSystem = user.attributes.ratingSystem;
18 api.settings.set('kitsuOptions', opt);
19
20 return {
21 username: user.attributes.name,
22 picture: user.attributes.avatar?.large || '',
23 href: `https://kitsu.app/users/${user.attributes.slug || user.id}`,
24 };
25 }
26
27 async getUserId() {
28 const userId = await api.storage.get('kitsuUserId');

Callers

nothing calls this directly

Calls 3

userRequestMethod · 0.95
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected