Skip to content

Commit

Permalink
⬆️ 2.0.1 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed May 11, 2016
1 parent c9de262 commit a966534
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 38 deletions.
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ This is an example application how to use the [`youtube-api`](https://github.com

1. You need a [Google Account](https://www.google.com/accounts/NewAccount) to access the Google APIs Console, request an API key, and register your application.
2. [Register your application](https://console.developers.google.com/project) with Google so that it can submit API requests:
3.
After registering your application, select **YouTube Data API** as one of the services that your application uses.

3. After registering your application, select **YouTube Data API** as one of the services that your application uses.

- Go to the [APIs Console](https://console.developers.google.com/project) and select the project that you just registered.
- Click on *APIs & auth* on the left side. Then a dropdown will be opened.
Expand All @@ -25,23 +23,17 @@ This is an example application how to use the [`youtube-api`](https://github.com

## Installation and usage

1.
Download this repository by running:

1. Download this repository by running:
```sh
git clone http://github.com/IonicaBizau/test-youtube-api
```
2.
Enter in the downloaded directory and run `npm install`:

2. Enter in the downloaded directory and run `npm install`:
```sh
cd test-youtube-api
npm install
```
3. Go back in your Google app and click again on *APIs & auth& and then select *Credentials*.
4.
Click <kbd>Create new Client ID</kbd>. This will create new OAuth 2.0 credentials:

3. Go back in your Google app and click again on *APIs & auth* and then select *Credentials*.
4. Click <kbd>Create new Client ID</kbd>. This will create new OAuth 2.0 credentials:

- Select *Web application*
- Click <kbd>Configure consent screen</kbd>
Expand All @@ -52,20 +44,16 @@ This is an example application how to use the [`youtube-api`](https://github.com
- Home page is optional
- Save the changes

-
Now you will have to set the auth urls. This test application uses the following urls:

- Now you will have to set the auth urls. This test application uses the following urls:

- Authorized JavaScript origins: `http://localhost:5000/` (paste it in the first textarea)
- Authorized redirect URIs: `http://localhost:5000/oauth2callback` (paste it in the second textarea)

- Finally, click <kbd>Create Client ID</kbd>



OK, at this step you have the credentials (in your Google app). Now you have to use them in this test application:


1. Rename `credentials.templ.json` into `credentials.json`.
2. Open `credentials.json` and replace `yourClientId` with the **client id** and `yourSecretKey` with **client secret** generated previously.
3. Now you are ready. Start the script (`npm start`) and open `http://localhost:5000`.
Expand Down
28 changes: 8 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-youtube-api",
"version": "2.0.0",
"version": "2.0.1",
"description": "Test Youtube API NodeJS module",
"author": "Ionică Bizău <[email protected]> (http://ionicabizau.net)",
"contributors": [
Expand Down Expand Up @@ -49,9 +49,7 @@
"You need a [Google Account](https://www.google.com/accounts/NewAccount) to access the Google APIs Console, request an API key, and register your application.",
"[Register your application](https://console.developers.google.com/project) with Google so that it can submit API requests:",
[
{
"p": "After registering your application, select **YouTube Data API** as one of the services that your application uses."
},
"After registering your application, select **YouTube Data API** as one of the services that your application uses.",
{
"ul": [
"Go to the [APIs Console](https://console.developers.google.com/project) and select the project that you just registered.",
Expand All @@ -74,9 +72,7 @@
{
"ol": [
[
{
"p": "Download this repository by running:"
},
"Download this repository by running:",
{
"code": {
"language": "sh",
Expand All @@ -85,9 +81,7 @@
}
],
[
{
"p": "Enter in the downloaded directory and run `npm install`:"
},
"Enter in the downloaded directory and run `npm install`:",
{
"code": {
"language": "sh",
Expand All @@ -98,11 +92,9 @@
}
}
],
"Go back in your Google app and click again on *APIs & auth& and then select *Credentials*.",
"Go back in your Google app and click again on *APIs & auth* and then select *Credentials*.",
[
{
"p": "Click <kbd>Create new Client ID</kbd>. This will create new OAuth 2.0 credentials:"
},
"Click <kbd>Create new Client ID</kbd>. This will create new OAuth 2.0 credentials:",
{
"ul": [
"Select *Web application*",
Expand All @@ -119,9 +111,7 @@
}
],
[
{
"p": "Now you will have to set the auth urls. This test application uses the following urls:"
},
"Now you will have to set the auth urls. This test application uses the following urls:",
{
"ul": [
"Authorized JavaScript origins: `http://localhost:5000/` (paste it in the first textarea)",
Expand All @@ -136,9 +126,7 @@
]
},
[
{
"p": "OK, at this step you have the credentials (in your Google app). Now you have to use them in this test application:"
},
"OK, at this step you have the credentials (in your Google app). Now you have to use them in this test application:",
{
"ol": [
"Rename `credentials.templ.json` into `credentials.json`.",
Expand Down

0 comments on commit a966534

Please sign in to comment.