File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -326,16 +326,26 @@ public function getBookVariables($id)
326326 * List email addresses from book
327327 *
328328 * @param $id
329+ * @param $limit
330+ * @param $offset
329331 *
330332 * @return stdClass
331333 */
332- public function getEmailsFromBook ($ id )
334+ public function getEmailsFromBook ($ id, $ limit = null , $ offset = null )
333335 {
334336 if (empty ($ id )) {
335337 return $ this ->handleError ('Empty book id ' );
336338 }
337339
338- $ requestResult = $ this ->sendRequest ('addressbooks/ ' . $ id . '/emails ' );
340+ $ data = array ();
341+ if (null !== $ limit ) {
342+ $ data ['limit ' ] = $ limit ;
343+ }
344+ if (null !== $ offset ) {
345+ $ data ['offset ' ] = $ offset ;
346+ }
347+
348+ $ requestResult = $ this ->sendRequest ('addressbooks/ ' . $ id . '/emails ' , 'GET ' , $ data );
339349
340350 return $ this ->handleResult ($ requestResult );
341351 }
You can’t perform that action at this time.
0 commit comments