How to refer to `api.addPosterIcon` from inside of a function

Great, thanks.

I wonder why api.getCurrentUser() works just fine from inside of the function while api.addPosterIcon still not?

I would like to try to use native API as much as possible rather than writing custom code solutions (which isn’t a problem at all).