{"id":1703,"date":"2013-03-04T15:04:00","date_gmt":"2013-03-04T15:04:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2013\/03\/04\/connecting-to-live-with-the-c-rest-sdk\/"},"modified":"2019-02-18T18:41:13","modified_gmt":"2019-02-18T18:41:13","slug":"connecting-to-live-with-the-c-rest-sdk","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/connecting-to-live-with-the-c-rest-sdk\/","title":{"rendered":"Connecting to Live with the C++ REST SDK"},"content":{"rendered":"<p>Hi, I&rsquo;m Andy Rich, a QA on the C++ team.&nbsp;&nbsp;Last week, the C++ team released the C++ REST SDK (codename &ldquo;Casablanca&rdquo;) on CodePlex (<a href=\"http:\/\/casablanca.codeplex.com\/\">http:\/\/casablanca.codeplex.com<\/a>).&nbsp; This blog post will walk you through using the C++ REST SDK to connect your Windows Store apps to Windows Live services.&nbsp; This example demonstrates how to grab information about the user&rsquo;s photo albums, but it can be applied to the other Live REST APIs as well.<\/p>\n<h2>Prerequisites<\/h2>\n<p>In order to connect a Windows Store app to Live Services, you will need:<\/p>\n<ul>\n<li>A Windows Store Developer account (sign up here: <a href=\"http:\/\/msdn.microsoft.com\/en-US\/windows\">http:\/\/msdn.microsoft.com\/en-US\/windows<\/a>).&nbsp; Note that you will need to provide a credit card to open a developer account. (MSDN subscribers are eligible for a <a href=\"https:\/\/msdn.microsoft.com\/subscriptions\/windevcenter\">one-time 12-month developer account<\/a>.)<\/li>\n<li>A Visual Studio Project which is associated with a Windows Store app in the Windows Dev Center.&nbsp; In order to connect to Live, your application will need a real store signing key and package identity, so you must complete the first few steps of the store submission process and associate your project with that app, even if you&rsquo;re just experimenting with the functionality. I outline the required steps in &ldquo;Setting up your App,&rdquo; below.<\/li>\n<li>The <a href=\"http:\/\/casablanca.codeplex.com\/releases\/view\/102558\">C++ REST SDK<\/a> for Visual Studio 2012 (express or full)<\/li>\n<\/ul>\n<h2>Setting up your App<\/h2>\n<p>To create a new app in your Dashboard within the Windows Dev Center, click &ldquo;Submit an app&rdquo;.&nbsp; (This will begin the submission process, but your app doesn&rsquo;t need to be ready for submission just yet!)&nbsp; You will be asked to reserve a name; this may be changed later, so don&rsquo;t worry about finding the perfect name for your app right now.<\/p>\n<p>Next, click &ldquo;Advanced Features&rdquo; in your app&rsquo;s dashboard entry and choose &ldquo;Save.&rdquo;&nbsp; You want to ensure that the Advanced Features step shows as &ldquo;Complete&rdquo; in your dashboard.<\/p>\n<p>Next, you will need to associate your Visual Studio project with the app entry you made on your developer account.&nbsp; To do this, right-click your project in Visual Studio, and select Store-&gt;Associate an App with the Store.&nbsp; You will be prompted to log into your developer account, and then shown a list of apps you have started; select the appropriate one, click &ldquo;next&rdquo; and then &ldquo;associate.&rdquo;<\/p>\n<p>It is <strong>vital<\/strong> that you complete this step &ndash; without a proper package identity and a store-signed key, Live Services will reject all login requests from your app.<\/p>\n<p>Finally, right-click your project and choose &ldquo;References,&rdquo; then click &ldquo;Add New Reference.&rdquo;&nbsp; Select Windows-&gt;Extensions and the check the box next to &ldquo;C++ REST Extension SDK for Windows Store apps&rdquo; and click &ldquo;Ok&rdquo;.&nbsp; This will add the necessary includes\/libs for the C++ REST SDK to your project.&nbsp; (If you cannot find the necessary reference in the dialog, make sure you have installed the <a href=\"http:\/\/casablanca.codeplex.com\/releases\/view\/102558\">appropriate SDK<\/a> and try restarting Visual Studio.)<\/p>\n<h2>Logging into Live<\/h2>\n<p>Let&rsquo;s work on logging into Live.&nbsp; This is done by using the Windows Runtime (WinRT) OnlineIdAuthenticator API, which presents users with a consistent and trusted login view across multiple apps.&nbsp; The user&rsquo;s consent will be cached with your app, so the login\/consent dialog will only appear the first time a user accesses you&rsquo;re app on a particular computer, unless the login expires or the user logs out.<\/p>\n<p>Include &lt;collection.h&gt; and &lt;ppltasks.h&gt; in your source file and add the following using declarations:<\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: blue;background: white\"> using<\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: blue;background: white\"> namespace<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black;background: white\"> Platform::Collections;<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black\"><br \/> <\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: blue;background: white\"> using<\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: blue;background: white\"> namespace<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black;background: white\"> Windows::Security::Authentication::OnlineId;<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black\"><br \/> <\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: blue;background: white\"> using<\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: blue;background: white\"> namespace<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black;background: white\"> concurrency;<\/span><\/p>\n<p>This code will log the user into Live using the OnlineIdAuthenticator:<\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> auto<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> auth = <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> ref<\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> new<\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #2b91af;background: white\"> OnlineIdAuthenticator<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">();<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> auto<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> request = <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> ref<\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> new<\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #2b91af;background: white\"> OnlineIdServiceTicketRequest<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">(<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\">&#8220;wl.signin wl.basic wl.photos&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">, <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;DELEGATION&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">);<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> auto<\/span><span> request_vec = <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> ref<\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> new<\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #2b91af;background: white\"> Vector<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">&lt;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: #2b91af;background: white\">OnlineIdServiceTicketRequest<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">^&gt;();<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> request_vec-&gt;Append(request);<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> &nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> create_task(auth-&gt;AuthenticateUserAsync(request_vec, <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #2b91af;background: white\"> CredentialPromptType<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">::<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: darkslategray;background: white\">PromptIfNeeded<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">))<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> .then([](<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: #2b91af;background: white\">UserIdentity<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">^ <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: gray;background: white\"> ident<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">){<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> auto<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> ticket = <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: gray;background: white\"> ident<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">-&gt;Tickets-&gt;GetAt(0);<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: green;background: white\"> \/\/token is a global std::wstring<br \/> <\/span> <span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black;background: white\"> <span>&nbsp;<\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>token = std::<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: #2b91af;background: white\">wstring<\/span><span style=\"font-size: 9.5pt;line-height: 107%;font-family: Consolas;color: black;background: white\">(ticket-&gt;Value-&gt;Data());<br \/> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>});<\/span><\/p>\n<p>We start by creating the OnlineIdAuthenticator object, and then create a request to log into Windows Live.&nbsp; In this case, we are requesting the wl.signin, wl.basic, and wl.photos scopes.&nbsp; You can view the full list of Windows Live scopes (and what they permit your app to access) <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/live\/hh243646.aspx\">here<\/a>.&nbsp;<\/p>\n<p>The OnlineIdAuthenticator allows you to submit multiple login requests simultaneously, but for our purposes, a single login request is sufficient.&nbsp; However, to match the AuthenticateUserAsync function&rsquo;s parameters, we will need to pass our request inside a single-element vector (request_vec).<\/p>\n<p>AuthenticateUserAsync may take over the user&rsquo;s screen to display the login prompt and gain the user&rsquo;s consent, so naturally this will be an asynchronous action.&nbsp; In the code above, we are using a PPL task continuation to inspect the login ticket after the user has consented.&nbsp; Note that we are not handling error cases where the user has not consented or the authentication fails (for example, due to an incorrect app association).&nbsp; These cases should be handled using a task-based continuation to catch the error and handle it appropriately.&nbsp; To learn more about using PPL, I recommend <a href=\"http:\/\/msdn.microsoft.com\/en-us\/magazine\/hh781020.aspx\">this article<\/a>.<\/p>\n<p>When the user has logged in and given their consent for your app to access their information, the continuation will be called back.&nbsp; Interestingly, most of the properties on the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/apps\/windows.security.authentication.onlineid.useridentity.aspx\">UserIdentity<\/a> that gets returned to you are actually unavailable (unless you are a &ldquo;Microsoft application partner&rdquo;).&nbsp; However, the only property we care about at this point is the security token which is found in the collection of tickets included in the UserIdentity.<\/p>\n<p>T\nhe token returned after successful login is required in later steps, and so needs to be stored somewhere for later access.&nbsp; In the example above, the token is being stored in a global variable; in a full application, this would more appropriately be stored in a member variable and protected against concurrent access and race conditions.<\/p>\n<h2>Understanding the Live REST Endpoint<\/h2>\n<p>It can be helpful to understand what the Live REST endpoint returns when it is used correctly, and the <a href=\"http:\/\/isdk.dev.live.com\/?mkt=en-us\">Live Interactive SDK<\/a> can be very helpful here.&nbsp; To use the Interactive SDK, you need to click the small &lsquo;Sign in&rsquo; link in the upper right-hand corner of the page and log in using a Windows Live account.&nbsp; For the following walkthrough, you should use an account which has some pictures stored in the user&rsquo;s SkyDrive.<\/p>\n<p>After logging in, expand &ldquo;SkyDrive API&rdquo; and select &ldquo;Albums, photos, videos, and tags&rdquo; and choose &ldquo;REST&rdquo; on the right-hand side.&nbsp; The Request path will be preloaded with &ldquo;\/me\/albums,&rdquo; which will get a list of the logged-in user&rsquo;s photo albums.&nbsp; If you click the &ldquo;Run&rdquo; button, the Interactive SDK will call to the Live REST API and show the results of the API call in the &ldquo;Response&rdquo; section.<\/p>\n<p>The Live REST API returns text formatted as <a href=\"http:\/\/en.wikipedia.org\/wiki\/JSON\">JSON (JavaScript Object Notation)<\/a>. This is a simple web-standard format to return structured data, which many different languages and frameworks have the ability to parse.&nbsp; Both Windows Runtime (through the Windows::Data::Json namespace) and the C++ REST API (through the web::json namespace) have the ability to parse JSON into object hierarchies which can be inspected and manipulated in code.&nbsp; We will use the C++ REST API&rsquo;s JSON parsing in this example.<\/p>\n<p>By viewing the structure of the response in the Interactive SDK, we can understand how the Live REST API returns information about the user&rsquo;s albums:<\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> { <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: green;background: white\"> \/\/ top-level object<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; <\/span>&#8220;data&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: [ <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: green;background: white\"> \/\/ array, 1 element per album<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp; <\/span>{<span>&nbsp; <\/span><\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: green;background: white\"> \/\/object, 1st element in the array <\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> &#8220;id&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;folder id&gt;&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> &#8220;from&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> { <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: green;background: white\"> \/\/object containing two members:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8220;name&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;friendly name of album owner&gt;&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8220;id&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;owner&rsquo;s id&gt;&#8221;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span> },<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;name&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;album&rsquo;s friendly name&gt;&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;description&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;friendly description of album&gt;&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;parent_id&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;folder id of parent&gt;&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;size&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: 405466,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;comments_count&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: 0,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;comments_enabled&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue;background: white\"> true<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;count&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: 26,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;link&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> &#8220;&lt;direct URL to the album&gt;&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">,<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: .0001pt;line-height: normal\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: #a31515;background: white\"> <span>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8220;type&#8221;<\/span><span style=\"font-size: 9.5pt;font-family: Consolas;color: black;background: white\">: <\/span> <span style=\"font-size: 9.5pt;font-family: Consolas;mso-bidi-fon\"><\/span><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, I&rsquo;m Andy Rich, a QA on the C++ team.&nbsp;&nbsp;Last week, the C++ team released the C++ REST SDK (codename &ldquo;Casablanca&rdquo;) on CodePlex (http:\/\/casablanca.codeplex.com).&nbsp; This blog post will walk you through using the C++ REST SDK to connect your Windows Store apps to Windows Live services.&nbsp; This example demonstrates how to grab information about the [&hellip;]<\/p>\n","protected":false},"author":280,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>Hi, I&rsquo;m Andy Rich, a QA on the C++ team.&nbsp;&nbsp;Last week, the C++ team released the C++ REST SDK (codename &ldquo;Casablanca&rdquo;) on CodePlex (http:\/\/casablanca.codeplex.com).&nbsp; This blog post will walk you through using the C++ REST SDK to connect your Windows Store apps to Windows Live services.&nbsp; This example demonstrates how to grab information about the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/1703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/280"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=1703"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/1703\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=1703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=1703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=1703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}