@@ -74,9 +74,9 @@ public static function getAll($custom_config = NULL)
74
74
return $ contactsArray ;
75
75
}
76
76
77
- public static function getBySelfURL ($ selfURL )
77
+ public static function getBySelfURL ($ selfURL, $ custom_config = NULL )
78
78
{
79
- $ client = GoogleHelper::getClient ();
79
+ $ client = GoogleHelper::getClient ($ custom_config );
80
80
81
81
$ req = new \Google_Http_Request ($ selfURL );
82
82
@@ -137,9 +137,9 @@ public static function getBySelfURL($selfURL)
137
137
return new Contact ($ contactDetails );
138
138
}
139
139
140
- public static function submitUpdates (Contact $ updatedContact )
140
+ public static function submitUpdates (Contact $ updatedContact, $ custom_config = NULL )
141
141
{
142
- $ client = GoogleHelper::getClient ();
142
+ $ client = GoogleHelper::getClient ($ custom_config );
143
143
144
144
$ req = new \Google_Http_Request ($ updatedContact ->selfURL );
145
145
@@ -215,7 +215,7 @@ public static function submitUpdates(Contact $updatedContact)
215
215
return new Contact ($ contactDetails );
216
216
}
217
217
218
- public static function create ($ name , $ phoneNumber , $ emailAddress )
218
+ public static function create ($ name , $ phoneNumber , $ emailAddress, $ custom_config = NULL )
219
219
{
220
220
$ doc = new \DOMDocument ();
221
221
$ doc ->formatOutput = true ;
@@ -239,7 +239,7 @@ public static function create($name, $phoneNumber, $emailAddress)
239
239
240
240
$ xmlToSend = $ doc ->saveXML ();
241
241
242
- $ client = GoogleHelper::getClient ();
242
+ $ client = GoogleHelper::getClient ($ custom_config );
243
243
244
244
$ req = new \Google_Http_Request ('https://www.google.com/m8/feeds/contacts/default/full ' );
245
245
$ req ->setRequestHeaders (array ('content-type ' => 'application/atom+xml; charset=UTF-8; type=feed ' ));
@@ -287,9 +287,9 @@ public static function create($name, $phoneNumber, $emailAddress)
287
287
return new Contact ($ contactDetails );
288
288
}
289
289
290
- public static function delete (Contact $ toDelete )
290
+ public static function delete (Contact $ toDelete, $ custom_config = NULL )
291
291
{
292
- $ client = GoogleHelper::getClient ();
292
+ $ client = GoogleHelper::getClient ($ custom_config );
293
293
294
294
$ req = new \Google_Http_Request ($ toDelete ->editURL );
295
295
$ req ->setRequestHeaders (array ('content-type ' => 'application/atom+xml; charset=UTF-8; type=feed ' ));
@@ -298,9 +298,9 @@ public static function delete(Contact $toDelete)
298
298
$ client ->getAuth ()->authenticatedRequest ($ req );
299
299
}
300
300
301
- public static function getPhoto ($ photoURL )
301
+ public static function getPhoto ($ photoURL, $ custom_config = NULL )
302
302
{
303
- $ client = GoogleHelper::getClient ();
303
+ $ client = GoogleHelper::getClient ($ custom_config );
304
304
$ req = new \Google_Http_Request ($ photoURL );
305
305
$ req ->setRequestMethod ('GET ' );
306
306
$ val = $ client ->getAuth ()->authenticatedRequest ($ req );
0 commit comments