Skip to content

Commit 93bf947

Browse files
Jason KimJason Kim
authored andcommitted
2 parents 7f845eb + f24a1a8 commit 93bf947

2 files changed

Lines changed: 54 additions & 50 deletions

File tree

README.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@
1515

1616
**Introduction**
1717

18-
The OneNote REST API Explorer for iOS explores the simple REST calls that access, add, update, and delete OneNote entities such as notebooks, section groups, sections, and pages. The app lets you authenticate against an Office 365 tenant and perform standard operations against the OneNote service in O365.
18+
The OneNote REST API Explorer for iOS explores the simple REST calls that access, add, update, and delete OneNote entities such as notebooks, section groups, sections, and pages. The app lets you authenticate against an Office 365 tenant and perform standard operations against the OneNote service in Office 365.
1919

20-
This sample includes the following operations for enterprise OneNote:
20+
This sample includes the following operations for OneNote:
2121

2222
**Notebook**
2323

24-
* Get a list of your noteobooks
24+
* Get a list of your notebooks
2525
* Get notebooks and expand notebook sections
2626
* Get a notebook by id
2727
* Get metadata for a notebook
2828
* Get notebooks by name
29+
* Get notebook shared by others
2930
* Get a sorted list of notebooks with metadata
3031
* Create a new notebook
3132

@@ -39,7 +40,6 @@ This sample includes the following operations for enterprise OneNote:
3940
* Get a list of sections in a notebook
4041
* Get a list of all sections
4142
* Get sections with a specific name
42-
* Get metadata of a section
4343
* Get sections by name
4444
* Get metadata for a section
4545
* Create a section
@@ -48,22 +48,28 @@ This sample includes the following operations for enterprise OneNote:
4848

4949
* Post a simple page with HTML content
5050
* Post a page with an embedded image
51+
* Post a page under a named section
52+
* Post a page with a PDF attachment
5153
* Get pages with a specific title
52-
* Post a page with a snapshot of a web page
54+
* Post a page with a snapshot of a web
5355
* Delete a page
5456
* Append text to a page
5557
* Post a page with an Url snapshot
5658
* Get the pages in a section
5759
* Post pages with rendered attachments
5860
* Post a page with note tags
59-
* post a page with business card image text
60-
* Post a page with extracted web page text
61+
* Post a page with business card image text
62+
* Post a page with extracted webpage text
63+
* Post a page with a recipe
64+
* Post a page with product info
6165
* Get a list of all pages
6266
* Get a paged list of pages
6367
* Get a sorted list of pages
6468
* Get the HTML contents of a page
69+
* Get metadata of a specific page
70+
* Search all pages
6571

66-
**Note:** Currently this sample does not support MSA authentication with accounts such as outlook.com or a live account. This functionality will be included in future updates.
72+
**Note:** Currently this sample does not support MSA authentication with accounts such as Outlook.com. This functionality will be included in future updates.
6773

6874

6975
##Change History
@@ -87,25 +93,25 @@ July 2015:
8793

8894

8995
##Set Up Your Environment
90-
Once you have an Office 365 account, an Azure AD account that is bound to your Office 365 Developer site, you'll need to perform the following steps:
96+
Once you have an Office 365 account, an Azure Active Directory (AD) account that is bound to your Office 365 Developer site, you'll need to perform the following steps:
9197

9298
1. Install and use CocoaPods to get the required dependencies into your project. We'll show you how to do later in the section **Use CocoaPods to import the required dependencies**.
9399
2. Register your application with Microsoft Azure, and configure the appropriate OneNote permissions.
94100
3. Enter the Azure app registration specifics (ClientID and RedirectUri) into the OneNote REST API Explorer for iOS app.
95101

96102
## Use CocoaPods to import the required dependencies
97-
Note: If you've never used CocoaPods before as a dependency manager you'll have to install it prior to getting the dependencies into your project. If you already have it installed you may skip this installation step and move on to **Getting the iOS dependencies in your project**.
103+
Note: If you've never before used CocoaPods as a dependency manager you'll need to install it prior to getting the dependencies into your project. If you already have it installed, you may skip this installation step and move on to **Getting the iOS dependencies in your project**.
98104

99-
Enter both these lines of code from the **Terminal** app on your Mac.
105+
Enter both of these lines of code from the **Terminal** app on your Mac.
100106

101107
sudo gem install cocoapods
102108
pod setup
103109

104-
If the install and setup were successful, you should see the message **Setup completed in Terminal**. For more information on CocoaPods, and its usage, see [CocoaPods](https://cocoapods.org/).
110+
If the install and setup were successful, you should see the message **Setup completed in Terminal**. For more information about CocoaPods and its usage, see [CocoaPods](https://cocoapods.org/).
105111

106112

107113
**Getting the iOS dependencies in your project.**
108-
The iOS-OneNote-REST Explorer sample has a dependency on the Active Directory Authentication Library for iOS (ADAL) for enabling client to access OneNote for enterprise notebooks. The ADAL provides protocol support for OAuth2, Web API integration with user level consent, and two-factor authentication. It also uses AFNetworking to help manage REST communication between the app and the OneNote service. The sample contains a podfile that will get the ADAL and AFNetworking components (pods) into your project. It's located in the root ("Podfile"). The syntax should look something similar to this:
114+
The iOS-OneNote-REST Explorer sample has a dependency on the Active Directory Authentication Library for iOS (ADAL) for enabling client to access OneNote for enterprise notebooks. The ADAL provides protocol support for OAuth 2.0, Web API integration with user level consent, and two-factor authentication. It also uses AFNetworking to help manage REST communication between the app and the OneNote service. The sample contains a podfile that will get the ADAL and AFNetworking components (pods) into your project. It's located in the root ("Podfile"). The syntax should look something similar to this:
109115

110116

111117
pod "AFNetworking", "~> 2.0"
@@ -127,32 +133,30 @@ Note: You should receive confirmation that these dependencies have been added to
127133
4. Click **Add** from the bottom menu.
128134
5. On the **What do you want to do page**, click **Add an application my organization is developing**.
129135
6. On the **Tell us about your application page**, specify **OneNote REST API Explorer** for the application name and select **NATIVE CLIENT APPLICATION** for type.
130-
7. Click the arrow icon on the bottom-right corner of the page.
131-
8. On the **Application information** page, specify a **Redirect URI**, for this example, you can specify http://localhost/OneNoteRESTExplorer, and then select the checkbox in the lower-right hand corner of the page. Remember this value for the below section **Getting the ClientID and RedirectUri into the project**.
132-
9. Once the application has been successfully added, you will be taken to the **Quick Start** page for the application. From here, select **Configure** in the top menu.
136+
7. Click the arrow icon on the lower-right corner of the page.
137+
8. On the **Application information** page, specify a **Redirect URI**, for this example, you can specify http://localhost/OneNoteRESTExplorer, and then select the check box in the lower-right hand corner of the page. Remember this value for the section below **Getting the ClientID and RedirectUri into the project**.
138+
9. Once the application has been successfully added, you will be taken to the **Quick Start** page for the application. From there, select **Configure** in the top menu.
133139
10. Under **permissions to other applications**, select **Add application.** Select OneNote and then the check box to proceed.
134-
11. For the **OneNote** application add the following permissions:
140+
11. For the **OneNote** application, add the following permissions:
135141
* View and modify OneNote notebooks in your organization
136142
* View and modify OneNote notebooks
137143
* Create pages in OneNote notebooks
138144
![](/readme-images/OneNotePermissions.jpg)
139145

140-
12. For the **Windows Azure Active Directory** application add or make sure the following permissions are enabled:
146+
12. For the **Windows Azure Active Directory** application, add or make sure the following permission is enabled:
141147
* Enable sign-on and read users' profiles
142-
* Access your organization's directory
143-
![](/readme-images/AADPermissions.jpg)
144148

145-
13. Copy the value specified for **Client ID** on the **Configure** page. Remember this value for the below section **Getting the ClientID and RedirectUri into the project**.
149+
13. Copy the value specified for **Client ID** on the **Configure** page. Remember this value for the section below **Getting the ClientID and RedirectUri into the project**.
146150
14. Click **Save** in the bottom menu.
147151

148152

149153

150154

151155
## Get the Client ID and Redirect Uri into the project
152156

153-
Finally you'll need to add the Client ID and Redirect Uri you recorded from the previous section **Register your app with Microsoft Azure**.
157+
Finally, you'll need to add the Client ID and Redirect Uri you recorded from the previous section **Register your app with Microsoft Azure**.
154158

155-
Browse the **iOS-REST-API-Explorer** project directory and open up the workspace (iOS-REST-API-Explorer). In the **O365Auth.m** file you'll see that the **ClientID** and **RedirectUri** values can be added to the top of the file. Supply the necessary values here:
159+
Browse the **iOS-REST-API-Explorer** project directory and open up the workspace (iOS-REST-API-Explorer). In the **O365Auth.m** file (located at iOS-REST-API_Explorer/Library/Authentication/O365Auth.m), you'll see that the **ClientID** and **RedirectUri** values can be added to the top of the file. Supply the necessary values here:
156160

157161
// You will set your application's clientId and redirect URI. You get
158162
// these when you register your application in Azure AD.
@@ -163,13 +167,13 @@ Browse the **iOS-REST-API-Explorer** project directory and open up the workspace
163167

164168

165169
##Understand the code
166-
The REST API Explorer for iOS project uses these classes to manage interactions with OneNote for Enterprise.
170+
The REST API Explorer for iOS project uses these classes to manage interactions with OneNote.
167171

168172
###Sample project organization
169173

170-
This sample demonstrates OneNote REST calls across the notebook, pages, sections, and section groups entities in O365. We use the Master-Detail app template in Xcode as a base. There are three primary sections of interest in the sample hierarchy:
174+
This sample demonstrates OneNote REST calls across the notebook, pages, sections, and section groups entities in Office 365. We use the Master-Detail app template in Xcode as a base. There are three primary sections of interest in the sample hierarchy:
171175

172-
- **Authentication (located in Library/Authentication)** - The OneNote API for iOS uses the Azure Active Directory Library (ADAL) for iOS for connecting your app to Office 365. The ADAL provides protocol support for OAuth2, Web API integration with user level consent, and two-factor authentication. The REST API Explorer uses the ADAL library to authenticate a user who wants to access OneNote for enterprise notebooks. The **Authentication** folder classes Authentication Manager and O365Auth that are responsible for authenticating the app to Office 365. Although not supported in this release, the code for authenticating with Microsoft Accounts (office.com, live.com) will be added in a future release.
176+
- **Authentication (located in Library/Authentication)** - The OneNote API for iOS uses the Azure Active Directory Library (ADAL) for iOS for connecting your app to Office 365. The ADAL provides protocol support for OAuth2, Web API integration with user level consent, and two-factor authentication. The REST API Explorer uses the ADAL library to authenticate a user who wants to access OneNote for enterprise notebooks. The **Authentication** folder classes Authentication Manager and O365Auth that are responsible for authenticating the app to Office 365. Although not supported in this release, the code for authenticating with Microsoft accounts (office.com, live.com) will be added in a future release.
173177

174178
- **OneNote Operations (located in OneNoteOperations)** - The class **OneNoteManager** is the library of REST operations that can be performed in this sample against OneNote (GET, POST, DELETE, and PATCH). We've also created an **Operations class (Operation.h/Operation.m)** that represents a single REST operation - it captures the operation name, REST URL, and other metadata.
175179

@@ -178,7 +182,7 @@ This sample demonstrates OneNote REST calls across the notebook, pages, sections
178182

179183
## Questions and comments
180184
We'd love to get your feedback about the OneNote REST API Explorer for iOS sample. You can send your feedback to us in the [Issues](https://github.com/OneNoteDev/iOS-REST-API-Explorer/issues) section of this repository. <br/>
181-
General questions about Office 365 development should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Make sure that your questions are tagged with [Office365] and [API].
185+
General questions about Office 365 development should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Make sure that your questions are tagged with [Office365], [API], and [OneNote].
182186

183187
## Additional resources
184188

0 commit comments

Comments
 (0)