-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathor.php
50 lines (42 loc) · 1.24 KB
/
or.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include './vendor/autoload.php';
// Your organization name
$org = 'rangaprasadramanujam-eval';
// API endpoint in Apigee’s cloud
$endpoint = 'https://apigee.com/';
// Authenticated user for this organization.
// This user should have the ‘devadmin’ (or ‘orgadmin’) role on Edge.
$user = '[email protected]';
// Password for the above user
$pass = 'Ranprarak76@12';
// An array of other connection options
$options = array(
'http_options' => array(
'connection_timeout' => 4,
'timeout' => 4
)
);
$org_config = new Apigee\Util\OrgConfig($org, $endpoint, $user, $pass, $options);
$developer = new Apigee\ManagementAPI\Developer($org_config);
try {
$developer->load('[email protected]');
$developer->setFirstName('Ran');
$developer->setLastName('Ram');
$developer->save();
print "Developer updated!\n";
}
catch (Apigee\Exceptions\ResponseException $e) {
print "Error".$e->getMessage();
}
echo "<pre>";
print_r($developer);
$app = new Apigee\ManagementAPI\DeveloperApp($org_config, $developer->getEmail());
try {
$app_list = $app->getListDetail();
foreach ($app_list as $my_app) {
print $my_app->getName() . "\n";
}
}
catch (Apigee\Exceptions\ResponseException $e) {
print $e->getMessage();
}