Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleStart with a copy of new Custom component

Let’s use a copy of new Custom component (Create a Component ) and name it ‘Confluence adapter’

Image Removed

Make a copy and edit…

image-20240319-152408.pngImage Removed
Expand
titleImport the SHELL library and associate it with a new repo

Let’s say git@bitbucket.org:interfaceware/atlassian (see Create a library

Expand
titleRename the Library folder and all the files in it to a new prefix

For instance:

...

Expand
titleImplement a good API method

Let’s call our new API method ATTLgetDescendants. We can rename ATTLcustom into ATTLgetDescendants and to rewrite its content.

This method will returns all pages in a space.

Image Removed

Expand
titleMore about API methods

Sometimes an API method would require a parameter which can be discovered only programmatically. In our example of Confluence Adapter this is Confluence Space Id parameter, which isn’t the same as a Space Key above.

The API method ATTLgetSpaceId will help us to discover this value. Let’s create new Lua file, name it ATTLgetSpaceId and write its content.

...

Expand
titleNot to forget the Help files

Add Help files to explain what parameters your custom the methods expect. Other users will appreciate this!

image-20240319-153543.png

...