Creating a search handler for your Data Source Provider plugin

Note: This document assumes you know already how to develop a DSP plugin. If you don’t please refer to the DSP docs at https://developer.applicaster.com/

Zapp provides a Search UI plugin that you can integrate in your mobile apps. To use this plugin you’ll need to install the Search UI plugin on your app. Find out more on how to set up the search plugin on Zapp here.

To be able to use the search plugin your DSP plugin must support search. This document describes how you can integrate search in your DSP plugin as a new handler.

Prerequisites

Before implementing the search handler on your DSP you'll need to make sure the customer provides a search API endpoint that you can query to get the search results from. It’s the responsibility of the customer (or the service the DSP connects to) to provide this endpoint. The API endpoint needs be able to accept a query string parameter and return a list of search results containing all the relevant info that is needed to be presented on the app (mainly the content type (e.g video), title, thumbnail, the URL of the video content and any other data you want the cell to present). All relevant documentation of the service search API should be passed to the DSP developer so she’ll be able to implement the search functionality.

Implementing the search handler on you DSP

Before you start make sure you read all the relevant information at https://developer.applicaster.com/Zapp-Pipes/Home.html on how to develop a DSP plugin.

  • Create the search handler like you create any other handler - the result of the handler should provide a feed that represents the search screen (feed of feeds) each feed on the list will represent one component on the search screen.

Creating a feed of feeds screen on the DSP means that you need to decide on the structure of the screen when developing the DSP - the components on the screen are tightly coupled to the feeds that the search handler produces.

json my-custom-dsp://fetchData?type=search&q=superman { "type": { "value": "feed", "title": "title" }, "entry": [ { "type": { "value": "feed" }, "content": { "src": "my-custom-dsp://fetchData?type=search&q=superman&component=1" } } ] }

Feed of feed example that represents a search results screen with one component

  • The main difference between the search handler and any other DSP handler is that the handler will get on its request URL a q parameter that will be passed by the search input text the end user is searching on the device. Use the q value to query the search API of the customer/data service you are connected to as described in the prerequisites section above.

results matching ""

    No results matching ""