You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-27Lines changed: 31 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,18 @@
15
15
16
16
**Introduction**
17
17
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.
19
19
20
-
This sample includes the following operations for enterprise OneNote:
20
+
This sample includes the following operations for OneNote:
21
21
22
22
**Notebook**
23
23
24
-
* Get a list of your noteobooks
24
+
* Get a list of your notebooks
25
25
* Get notebooks and expand notebook sections
26
26
* Get a notebook by id
27
27
* Get metadata for a notebook
28
28
* Get notebooks by name
29
+
* Get notebook shared by others
29
30
* Get a sorted list of notebooks with metadata
30
31
* Create a new notebook
31
32
@@ -39,7 +40,6 @@ This sample includes the following operations for enterprise OneNote:
39
40
* Get a list of sections in a notebook
40
41
* Get a list of all sections
41
42
* Get sections with a specific name
42
-
* Get metadata of a section
43
43
* Get sections by name
44
44
* Get metadata for a section
45
45
* Create a section
@@ -48,22 +48,28 @@ This sample includes the following operations for enterprise OneNote:
48
48
49
49
* Post a simple page with HTML content
50
50
* Post a page with an embedded image
51
+
* Post a page under a named section
52
+
* Post a page with a PDF attachment
51
53
* 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
53
55
* Delete a page
54
56
* Append text to a page
55
57
* Post a page with an Url snapshot
56
58
* Get the pages in a section
57
59
* Post pages with rendered attachments
58
60
* 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
61
65
* Get a list of all pages
62
66
* Get a paged list of pages
63
67
* Get a sorted list of pages
64
68
* Get the HTML contents of a page
69
+
* Get metadata of a specific page
70
+
* Search all pages
65
71
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.
67
73
68
74
69
75
##Change History
@@ -87,25 +93,25 @@ July 2015:
87
93
88
94
89
95
##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:
91
97
92
98
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**.
93
99
2. Register your application with Microsoft Azure, and configure the appropriate OneNote permissions.
94
100
3. Enter the Azure app registration specifics (ClientID and RedirectUri) into the OneNote REST API Explorer for iOS app.
95
101
96
102
## 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**.
98
104
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.
100
106
101
107
sudo gem install cocoapods
102
108
pod setup
103
109
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/).
105
111
106
112
107
113
**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:
109
115
110
116
111
117
pod "AFNetworking", "~> 2.0"
@@ -127,32 +133,30 @@ Note: You should receive confirmation that these dependencies have been added to
127
133
4. Click **Add** from the bottom menu.
128
134
5. On the **What do you want to do page**, click **Add an application my organization is developing**.
129
135
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.
133
139
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:
135
141
* View and modify OneNote notebooks in your organization
136
142
* View and modify OneNote notebooks
137
143
* Create pages in OneNote notebooks
138
144

139
145
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:
141
147
* Enable sign-on and read users' profiles
142
-
* Access your organization's directory
143
-

144
148
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**.
146
150
14. Click **Save** in the bottom menu.
147
151
148
152
149
153
150
154
151
155
## Get the Client ID and Redirect Uri into the project
152
156
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**.
154
158
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:
156
160
157
161
// You will set your application's clientId and redirect URI. You get
158
162
// 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
163
167
164
168
165
169
##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.
167
171
168
172
###Sample project organization
169
173
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:
171
175
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.
173
177
174
178
-**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.
175
179
@@ -178,7 +182,7 @@ This sample demonstrates OneNote REST calls across the notebook, pages, sections
178
182
179
183
## Questions and comments
180
184
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].
0 commit comments