Skip to content

Commit 1bab59a

Browse files
Move the existing sample into a compute/ subdirectory and update README
and CONTRIBUTING docs.
1 parent 2552056 commit 1bab59a

File tree

6 files changed

+89
-77
lines changed

6 files changed

+89
-77
lines changed

CONTRIB.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# How to become a contributor and submit your own code
2+
3+
## Contributor License Agreements
4+
5+
We'd love to accept your patches! Before we can take them, we
6+
have to jump a couple of legal hurdles.
7+
8+
Please fill out either the individual or corporate Contributor License Agreement
9+
(CLA).
10+
11+
* If you are an individual writing original source code and you're sure you
12+
own the intellectual property, then you'll need to sign an [individual CLA]
13+
(https://developers.google.com/open-source/cla/individual).
14+
* If you work for a company that wants to allow you to contribute your work,
15+
then you'll need to sign a [corporate CLA]
16+
(https://developers.google.com/open-source/cla/corporate).
17+
18+
Follow either of the two links above to access the appropriate CLA and
19+
instructions for how to sign and return it. Once we receive it, we'll be able to
20+
accept your pull requests.
21+
22+
## Contributing A Patch
23+
24+
1. Submit an issue describing your proposed change to the repo in question.
25+
1. The repo owner will respond to your issue promptly.
26+
1. If your proposed change is accepted, and you haven't already done so, sign a
27+
Contributor License Agreement (see details above).
28+
1. Fork the desired repo, develop and test your code changes.
29+
1. Ensure that your code adheres to the existing style in the sample to which
30+
you are contributing. Refer to the
31+
[Google Cloud Platform Samples Style Guide]
32+
(https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the
33+
recommended coding standards for this organization.
34+
1. Ensure that your code has an appropriate set of unit tests which all pass.
35+
1. Submit a pull request.

README.md

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,15 @@
1-
# Google Compute Engine PHP Sample Application
1+
## PHP Docs Samples
22

3-
## Description
4-
This is a simple web-based example of calling the Google Compute Engine API
5-
in PHP.
3+
A collection of samples that demonstrate how to call Google Cloud services from PHP.
64

7-
## Prerequisites:
8-
Please make sure that all of the following is installed before trying to run
9-
the sample application.
5+
See our other [Google Cloud Platform github
6+
repos](https://github.com/GoogleCloudPlatform) for sample applications and
7+
scaffolding for other frameworks and use cases.
108

11-
- PHP 5.2.x or higher [http://www.php.net/]
12-
- PHP Curl extension [http://www.php.net/manual/en/intro.curl.php]
13-
- PHP JSON extension [http://php.net/manual/en/book.json.php]
14-
- The google-api-php-client library checked out locally
15-
[https://code.google.com/p/google-api-php-client/]
9+
## Contributing changes
1610

17-
## Setup Authentication
18-
NOTE: This README assumes that you have enabled access to the Google Compute
19-
Engine API via the Google API Console page.
11+
* See [CONTRIBUTING.md](CONTRIBUTING.md)
2012

21-
1) Visit https://code.google.com/apis/console/?api=compute to register your
22-
application.
23-
- Click on "API Access" in the left column
24-
- Click the button labeled "Create an OAuth2 client ID..." if you have not
25-
generated any client IDs, or "Create another client ID..." if you have
26-
- Give your application a name and click "Next"
27-
- Select "Web Application" as the "Application type"
28-
- Click "Create client ID"
29-
- Click "Edit settings..." for your new client ID
30-
- Under the redirect URI, enter the location of your application
31-
- Click "Update"
32-
- Click on "Overview" in the left column and note the Project ID
13+
## Licensing
3314

34-
2) Update app.php with the redirect uri, consumer key, secret, and Project ID
35-
obtained in step 1.
36-
- Update 'YOUR_CLIENT_ID' with your oauth2 client id.
37-
- Update 'YOUR_CLIENT_SECRET' with your oauth2 client secret.
38-
- Update 'YOUR_REDIRECT_URI' with the fully qualified
39-
redirect URI.
40-
- Update 'YOUR_GOOGLE_COMPUTE_ENGINE_PROJECT' with your Project ID from the
41-
API Console.
42-
43-
## Running the Sample Application
44-
3) Load app.php on your web server, and visit the appropriate website in
45-
your web browser.
15+
* See [LICENSE](LICENSE)

compute/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Google Compute Engine PHP Sample Application
2+
3+
## Description
4+
This is a simple web-based example of calling the Google Compute Engine API
5+
in PHP.
6+
7+
## Prerequisites:
8+
Please make sure that all of the following is installed before trying to run
9+
the sample application.
10+
11+
- PHP 5.2.x or higher [http://www.php.net/]
12+
- PHP Curl extension [http://www.php.net/manual/en/intro.curl.php]
13+
- PHP JSON extension [http://php.net/manual/en/book.json.php]
14+
- The google-api-php-client library checked out locally
15+
[https://code.google.com/p/google-api-php-client/]
16+
17+
## Setup Authentication
18+
NOTE: This README assumes that you have enabled access to the Google Compute
19+
Engine API via the Google API Console page.
20+
21+
1) Visit https://code.google.com/apis/console/?api=compute to register your
22+
application.
23+
- Click on "API Access" in the left column
24+
- Click the button labeled "Create an OAuth2 client ID..." if you have not
25+
generated any client IDs, or "Create another client ID..." if you have
26+
- Give your application a name and click "Next"
27+
- Select "Web Application" as the "Application type"
28+
- Click "Create client ID"
29+
- Click "Edit settings..." for your new client ID
30+
- Under the redirect URI, enter the location of your application
31+
- Click "Update"
32+
- Click on "Overview" in the left column and note the Project ID
33+
34+
2) Update app.php with the redirect uri, consumer key, secret, and Project ID
35+
obtained in step 1.
36+
- Update 'YOUR_CLIENT_ID' with your oauth2 client id.
37+
- Update 'YOUR_CLIENT_SECRET' with your oauth2 client secret.
38+
- Update 'YOUR_REDIRECT_URI' with the fully qualified
39+
redirect URI.
40+
- Update 'YOUR_GOOGLE_COMPUTE_ENGINE_PROJECT' with your Project ID from the
41+
API Console.
42+
43+
## Running the Sample Application
44+
3) Load app.php on your web server, and visit the appropriate website in
45+
your web browser.

app.php renamed to compute/app.php

File renamed without changes.

favicon.ico

8.15 KB
Binary file not shown.

0 commit comments

Comments
 (0)