AP documentation / usage questions

Question on recommended usage of AP. in Confluence Cloud:

The documentation shows e.g (https://developer.atlassian.com/cloud/confluence/modules/dynamic-content-macro/):

AP.require("confluence", function (confluence) {
    var macroData = confluence.getMacroData(function(macroParams) {

And in other places (e.g. https://developer.atlassian.com/cloud/confluence/jsapi/confluence/) the following usage is shown:

AP.confluence.saveMacro({foo: 'bar'}, "a new macro body");

My question is the following: Is one of the two calling styles (AP.require("confluence", ... or AP.confluence. ...) to be preferred?
Or is it just a matter of taste of the documentation writer?

IIRC AP.require is deprecated. The Guides documentation space is just not being updated (because we all know Connect is dead in the water, although obviously we will all say it’s not for political reasons :speak_no_evil:).


@remie Thanks for the insight!