-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add UserInfo Endpoint, count() method to return the count of all records
- Loading branch information
Michael Fairchild
committed
Mar 29, 2018
1 parent
5c31d2b
commit f0167f2
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php namespace Infusionsoft\Api\Rest\Traits; | ||
|
||
use Infusionsoft\InfusionsoftException; | ||
|
||
trait CannotList { | ||
|
||
public function all() { | ||
throw new InfusionsoftException( | ||
__CLASS__.' cannot use '.__FUNCTION__.' function.' | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php namespace Infusionsoft\Api\Rest; | ||
|
||
use Infusionsoft\Api\Rest\Traits\CannotCreate; | ||
use Infusionsoft\Api\Rest\Traits\CannotDelete; | ||
use Infusionsoft\Api\Rest\Traits\CannotFind; | ||
use Infusionsoft\Api\Rest\Traits\CannotList; | ||
use Infusionsoft\Api\Rest\Traits\CannotSave; | ||
use Infusionsoft\Api\Rest\Traits\CannotSync; | ||
use Infusionsoft\Api\Rest\Traits\CannotWhere; | ||
|
||
class UserInfoService extends RestModel | ||
{ | ||
use CannotList, CannotWhere, CannotSync, CannotSave, CannotFind, CannotDelete, CannotCreate; | ||
|
||
public $full_url = 'https://api.infusionsoft.com/crm/rest/v1/oauth/connect/userinfo'; | ||
|
||
public function get() | ||
{ | ||
|
||
$data = $this->client->restfulRequest('get', $this->getIndexUrl()); | ||
|
||
return $data; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters