You are here

public function ServicesClientConnection::update in Services Client 7.2

Same name and namespace in other branches
  1. 7 services_client_connection/include/connection.inc \ServicesClientConnection::update()

Update data from remote endpoint.

Parameters

string $resource: Resource type like 'node' or 'user'

int $id: Id of remote resource

mixed $data: Optionally additional data that should be added to query

Return value

Response from remote API

File

services_client_connection/include/connection.inc, line 278
Main services client connection class which exposes simple API

Class

ServicesClientConnection
@file Main services client connection class which exposes simple API

Code

public function update($resource, $id = NULL, $data = array()) {
  $this->http_request = $this
    ->createRequest(array(
    'resource' => $resource,
    'id' => $id,
    'data' => $data,
    'action' => 'update',
  ));
  return $this
    ->processRequest()->data;
}