# Class: RestAPI

## RestAPI

WPGMZA.RestAPI

#### new RestAPI()

  Used to interact with the WordPress REST API. Please do not call this constructor directly. Always use createInstance rather than instantiating this class directly. Using createInstance allows this class to be externally extensible.

### Methods

#### <static> createInstance()

  Creates an instance of a RestAPI, please always use this function rather than calling the constructor directly.

#### call(route, params)

  Makes an AJAX to the REST API, this function is a wrapper for $.ajax

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `route` | string | The REST API route
  `params` | object | The request parameters, see http://api.jquery.com/jquery.ajax/

#### Search results