Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MessageBird/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Client
const CHATAPI_ENDPOINT = 'https://chat.messagebird.com/1';
const VOICEAPI_ENDPOINT = 'https://voice.messagebird.com';

const CLIENT_VERSION = '1.9.1';
const CLIENT_VERSION = '1.9.2';

/**
* @var string
Expand Down
10 changes: 6 additions & 4 deletions src/MessageBird/Resources/Contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,33 @@ public function update($object, $id)

/**
* @param $id
* @param array|null $parameters
* @return $this ->Object
*/
public function getMessages($id)
public function getMessages($id, $parameters = array())
{
if (is_null($id)) {
throw new InvalidArgumentException('No contact id provided.');
}

$this->setObject(new Objects\Message());
$this->setResourceName($this->resourceName . '/' . $id . '/messages');
return $this->getList();
return $this->getList($parameters);
}

/**
* @param $id
* @param array|null $parameters
* @return $this ->Object
*/
public function getGroups($id)
public function getGroups($id, $parameters = array())
{
if (is_null($id)) {
throw new InvalidArgumentException('No contact id provided.');
}

$this->setObject(new Objects\Group());
$this->setResourceName($this->resourceName . '/' . $id . '/groups');
return $this->getList();
return $this->getList($parameters);
}
}
5 changes: 3 additions & 2 deletions src/MessageBird/Resources/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,20 @@ public function update($object, $id)

/**
* @param string $id
* @param array|null $parameters
*
* @throws InvalidArgumentException
*
* @return mixed
*/
public function getContacts($id = null)
public function getContacts($id = null, $parameters = array())
{
if (is_null($id)) {
throw new InvalidArgumentException('No group id provided.');
}

$this->setResourceName($this->resourceName . '/' . $id . '/contacts');
return $this->getList();
return $this->getList($parameters);
}

/**
Expand Down