Reference Source Test
public class | source

Filters

Extends:

* → Filters

Filters Class - Provides access to the Mux Data Filters API

Example:

const muxClient = new Mux(accessToken, secret);
const { Data } = muxClient;

// Lists all the filters broken out into basic and advanced
Data.Filters.list();

Test:

Method Summary

Public Methods
public

get(filterId: string, queryParams: Object): Promise

Lists the values for a filter along with a total count of related views

public

Lists all the filters broken out into basic and advanced

Public Methods

public get(filterId: string, queryParams: Object): Promise source

Lists the values for a filter along with a total count of related views

Params:

NameTypeAttributeDescription
filterId string

The filter name/id for see https://api-docs.mux.com/#filter-get-1 for a list of all filter ids

queryParams Object
  • optional

example { timeframe: ['7:days'], filters: ['operating_system:windows'] }

Return:

Promise

Returns a resolved Promise with a response from the Mux API

Example:

const muxClient = new Mux(accessToken, secret);
const { Data } = muxClient;

// Lists the values for a filter along with a total count of related views
Data.Filters.get('browser', { timeframe: ['7:days'] });

Test:

See:

public list(): Promise source

Lists all the filters broken out into basic and advanced

Return:

Promise

Returns a resolved Promise with a response from the Mux API

Example:

const muxClient = new Mux(accessToken, secret);
const { Data } = muxClient;

// Lists the available video view exports along with URLs to retrieve them
Data.Filters.list();

See: