Versions Compared

Key

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

...

Code Block
# client = SquirroClient(…)
client.create_enrichment(
    'Sz7LLLbyTzy_SddblwIxaA',
    'pipelet',
    'TextRazorModify Title',
    {'pipelet': 'tenant-example/Modify Title', 'suffix': ' - Title Modified'}
)

This configures a pipelet on project "Sz7LLLbyTzy_SddblwIxaA". The enrichment is called "Modify Title" and uses a pipelet of the same name (use the get_pipelets() call to find the full name in your installation). The config is passed on to the pipelet, so the suffix will be added to the configuration as per the configuration example above.

Also pipelets can be set to execute before a certain pipeline stage. The following example outlines how to do that:

Code Block
# client = SquirroClient(…)
client.create_enrichment(
    'Sz7LLLbyTzy_SddblwIxaA',
    'pipelet',
    'TextRazorModify Title',
    {'pipelet': 'tenant-example/Modify Title', 'suffix': ' - Title Modified'},
    before='content'
)