DevPortal Custom: Extract developer details from application Object

Not applicable

Hi there,

I am in process of integrating Devportal with third party API.

When an action is performed in DevPortal, Data needs to be posted to third party API.

I am able to do that without any problem. Now the question is where can I get the developer details.

I have $certified_app which is defined as below.

$certified_app = $app instanceOf ApigeeCompanyAppEntity ? new \Apigee\ManagementAPI\CompanyApp($config, $app->companyName): new \Apigee\ManagementAPI\DeveloperApp($config, $app->developer);

and would like to get developer email address and company name. What is the relationship between developer and the app in the implementation (I understand that Developer can be assigned to multiple apps.).

AbstractApp class has function to get getConsumerSecret(), getConsumerKey but couldnt find a function to get email address of developer. Do I need to use getAttribute function.

Any help is appreciated.

0 2 523
2 REPLIES 2

Not applicable
@Anil Sagar

Any suggestions please.

@Pradeep Ande ,

I believe assumption is logged in developer is creating app / editing app in developer portal. You can get logged in user email using code below,

global $user;
$user_email = $user->email;

If you would like get list of apps,

global $user;
$module_path = drupal_get_path('module', 'devconnect_developer_apps');
$app_entities = entity_load('developer_app', FALSE, array('mail' => $user->mail));

If you would like to get particular app details by appId,

$entities = entity_load('developer_app', array($app_id), array('mail' => $user->mail));

Hope it helps. Keep us posted if any.