Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#OneNote API Ruby on Rails Sample README
# OneNote API Ruby on Rails Sample README

Created by Microsoft Corporation, 2014. Provided As-is without warranty. Trademarks mentioned here are the property of their owners.

###API functionality demonstrated in this sample
### API functionality demonstrated in this sample
This sample illustrates how to use the OneNote REST API for the following use cases:

* [Log-in the user](http://msdn.microsoft.com/EN-US/library/office/dn575435.aspx)
Expand All @@ -13,12 +13,12 @@ This sample illustrates how to use the OneNote REST API for the following use ca
* [POST page with a PDF file rendered and attached](http://msdn.microsoft.com/EN-US/library/office/dn655137.aspx)
* [Extract the returned oneNoteClientURL and oneNoteWebURL links](http://msdn.microsoft.com/EN-US/library/office/dn575433.aspx)

###Prerequisites
### Prerequisites


#####Tools and Libraries
##### Tools and Libraries

You will need to download, install, and configure for your Ruby on Rails development environment. If you are new to Ruby on Rails, please go to [http://rubyonrails.org/download](http://rubyonrails.org/download) to get started.
You will need to download, install, and configure for your Ruby on Rails development environment. If you are new to Ruby on Rails, please go to [https://rubyonrails.org/download](http://rubyonrails.org/download) to get started.

Once you have your Ruby on Rails environment up and running, be sure to verify the prerequisites for these too (in Gemfile for yours app).

Expand All @@ -30,40 +30,39 @@ Once you have your Ruby on Rails environment up and running, be sure to verify t
You also need a normal URL with hostname (not just an IP address) to use for the Redirect URL. If you run this from your own desktop, you'll need to modify your Hosts file (in C:\Windows\System32\drivers\etc for Windows machines and /private/etc for Macs) and map your local server IP address to a new domain name, as in the following example.
![Modify your Hosts file and map your local server IP address to a new domain name](images/HostsFile.png)

#####Microsoft Account
##### Microsoft Account

As the developer, you'll need to have a [Microsoft account](http://msdn.microsoft.com/EN-US/library/office/dn575426.aspx) and get a client ID so your app can authenticate with the Microsoft Live connect services.
As the developer, you'll need to have a [Microsoft account](https://msdn.microsoft.com/EN-US/library/office/dn575426.aspx) and get a client ID so your app can authenticate with the Microsoft Live connect services.


###Using the sample###
### Using the Sample

After you've setup your development tools, and installed the prerequisites listed above,....
After you've setup your development tools, and installed the prerequisites listed above,

1. Download the repo as a ZIP file to your local computer, and extract the files. Or, clone the repository into a local copy of Git.
1. Download the repo as a ZIP file to your local computer, and extract the files. Or, clone the repository into a local copy of git.
2. Go to the [Microsoft app registration page](https://account.live.com/developers/applications/index).
3. On the API Settings page, set Mobile or desktop setting to No.
4. Set the Redirect URI to the domain name of your web site, as in the following example. The root domain name must be unique, so if you use one domain for testing and another for production, you'll need to register separate client ids and secrets for each domain.
![Specify API settings in the Microsoft Application Registration Portal](images/OneNoteMSAScreen.png)
5. On the App Setting page, copy the client ID and secret into the config/onenote.yml file.
6. Build and run the Ruby on rails app.
5. On the App Setting page, copy the client ID and secret into the `config/onenote.yml` file.
6. Build and run the Ruby on Rails app.
7. Open a browser and navigate to the app running by default on port 3000.
8. Login using your Microsoft account, and allow the app to create pages in your OneNote notebooks.

### Version info

This is the initial public release for this code sample.


### Learning more

* Visit the [dev.onenote.com](http://dev.onenote.com) Dev Center
* Contact us on [StackOverflow (tagged OneNote)](http://go.microsoft.com/fwlink/?LinkID=390182)
* Follow us on [Twitter @onenotedev](http://www.twitter.com/onenotedev)
* Read our [OneNote Developer blog](http://go.microsoft.com/fwlink/?LinkID=390183)
* Explore the API using the [apigee.com interactive console](http://go.microsoft.com/fwlink/?LinkID=392871).
Also, see the [short overview/tutorial](http://go.microsoft.com/fwlink/?LinkID=390179).
* [API Reference](http://msdn.microsoft.com/en-us/library/office/dn575437.aspx) documentation
* [Debugging / Troubleshooting](http://msdn.microsoft.com/EN-US/library/office/dn575430.aspx)
* [Getting Started](http://go.microsoft.com/fwlink/?LinkID=331026) with the OneNote API
* Visit the [dev.onenote.com](https://dev.onenote.com) Dev Center
* Contact us on [StackOverflow (tagged OneNote)](https://go.microsoft.com/fwlink/?LinkID=390182)
* Follow us on [Twitter @onenotedev](https://www.twitter.com/onenotedev)
* Read our [OneNote Developer blog](https://go.microsoft.com/fwlink/?LinkID=390183)
* Explore the API using the [apigee.com interactive console](https://go.microsoft.com/fwlink/?LinkID=392871).
Also, see the [short overview/tutorial](https://go.microsoft.com/fwlink/?LinkID=390179).
* [API Reference](https://msdn.microsoft.com/en-us/library/office/dn575437.aspx) documentation
* [Debugging / Troubleshooting](https://msdn.microsoft.com/EN-US/library/office/dn575430.aspx)
* [Getting Started](https://go.microsoft.com/fwlink/?LinkID=331026) with the OneNote API

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.