# Class RestAPI

This class facilitates all communication between the client and any server side modules which can be interacted with through the WordPress REST API.

  WPGMZA\Factory
  WPGMZA\RestAPI

Namespace: WPGMZA
Located at class.rest-api.php

Methods summary
`public` | # `__construct( )` Constructor Constructor
`public` | # `onEnqueueScripts( )` Enqueues the wp-api script, required to use the Rest API client side. Enqueues the wp-api script, required to use the Rest API client side.
`public` | # `onRestAPIInit( )` Callback for the rest_api_init action, this function registers the plugins REST API routes. Callback for the rest_api_init action, this function registers the plugins REST API routes.
`public` | # `maps( $request )`
`protected` | # `sanitizeFieldNames( $fields, $table )`
`public mixed` | # `markers( WP_REST_Request $request )` Callback for the /markers REST API route. Callback for the /markers REST API route. #### Parameters $request REST request. #### Returns mixed Where an ID is specified on the URL, a single marker is returned. Where no ID is specified, an array of all markers are returned.
`public` | # `datatables( )`

Methods inherited from WPGMZA\Factory
`createInstance()`

Constants summary
`string` | `NS` #### Const The plugins REST API namespace | # `'wpgmza/v1'`