Skip to content

Commit

Permalink
Merge branch 'new-version' of github.com:IonicaBizau/test-youtube-api…
Browse files Browse the repository at this point in the history
… into new-version
  • Loading branch information
IonicaBizau committed May 11, 2016
2 parents 3a6eff1 + 553afa2 commit 8587605
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*~
*.swp
/node_modules
*.swo
*~
*.log
credentials.json
node_modules
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Contributions are more than welcome!

Thanks! :sweat_smile:



[1]: https://github.com/IonicaBizau/test-youtube-api/issues

[2]: https://github.com/IonicaBizau/code-style
[2]: https://github.com/IonicaBizau/code-style
4 changes: 4 additions & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Documentation

You can see below the API reference of this module.

49 changes: 28 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,79 @@

# YouTube API Test Application [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![Version](https://img.shields.io/npm/v/test-youtube-api.svg)](https://www.npmjs.com/package/test-youtube-api) [![Downloads](https://img.shields.io/npm/dt/test-youtube-api.svg)](https://www.npmjs.com/package/test-youtube-api) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)

> Test Youtube API NodeJS module

This is an example application how to use the [`youtube-api`](https://github.com/IonicaBizau/youtube-api) library and explore the YouTube API resources.

## Before you start

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.
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.
- Select *APIs*.
- Search for *YouTube Data API v3*, click it and click <kbd>Enable API</kbd>




## Installation and usage

1.
1.
Download this repository by running:

```sh
git clone http://github.com/IonicaBizau/test-youtube-api
```
2.
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.
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>
- Complete the required fields:

- Product name: what ever you want (e.g. "Youtube API Test")
- Product logo is optional
- Home page is optional
- Save the changes
-

-
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`.

## How to contribute

## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].

## License

## :scroll: License

[MIT][license] © [Ionică Bizău][website]

Expand All @@ -76,4 +83,4 @@ Have an idea? Found a bug? See [how to contribute][contributing].
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2013#license-mit
[website]: http://ionicabizau.net
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
[docs]: /DOCUMENTATION.md
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-youtube-api",
"version": "1.1.1",
"version": "1.1.2",
"description": "Test Youtube API NodeJS module",
"author": "Ionică Bizău <bizauionica@gmail.com> (http://ionicabizau.net)",
"contributors": [
Expand Down Expand Up @@ -148,5 +148,16 @@
}
]
]
}
},
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
"resources/",
"menu/",
"cli.js",
"index.js"
]
}

0 comments on commit 8587605

Please sign in to comment.