Skip to content

Commit

Permalink
I have implemented this class to fetch mailThreads from PipeDrive API…
Browse files Browse the repository at this point in the history
…. The resource was not already present in the API client.

The following end-points has been implemented.

GET https://api.pipedrive.com/v1/mailbox/mailThreads?folder=inbox&start=0&limit=2&api_token=??
GET https://api.pipedrive.com/v1/mailbox/mailThreads/122?api_token=
  • Loading branch information
Muhammad Shahid committed Nov 7, 2019
1 parent 80242e4 commit 7447157
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Resources/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,15 @@ public function mailThreads($folder, $options = [])

return $this->request->get('mailThreads', $options);
}

/**
* Get mail messages inside specified mail thread by ID.
*
* @param $id Mail threads ID to find messages.
* @return Response
*/
public function mailMessages($id)
{
return $this->request->get('mailThreads/:id/mailMessages', compact('id'));
}
}

0 comments on commit 7447157

Please sign in to comment.