()
| 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'); |
nothing calls this directly
no test coverage detected