Examples - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Hereafter is shown how an empty request can be launched in the current page context. 

AFSWidget.sdk.search.request.launch({});

The following example build a new AFS Widgets application URL with specific parameters.

var url = AFSWidget.sdk.search.request.build({"keywords": "foo bar", "replies": 42});

// url contains:
// #search;query=foo+bar;option=afs%3Areplies%5C242

It is also possible to only update the current application state like below:

var search = AFSWidget.sdk.search.request.last();
search['page'] = 2;
AFSWidget.sdk.search.request.launch(search);