Dropbox REST API Part 3: Create, Delete and Move Folders
February 19, 2012
In the previous part (part 2: API Requests) I mentioned that the third part would show you how to perform various folder operations such as creating, deleting and moving folders.
Well it has been a month, so let’s get to it. Go to the download page and download the source code of part 2 (Article #63). Unzip and open the solution in Visual Studio. Make sure you modify the API key and secret located in the console application (Program.cs code file). Replace the values with your own application’s key and secret.
Ready? Set? OK, let’s start with creating folders…
Enabling SSL for a WCF Service
January 30, 2012
Last week a reader mailed me with some questions about my “WCF over HTTPS” blog post, which I wrote almost 3 years ago.
I created some sample code to help him enable SSL for a WCF service. Last year this was my most popular article, so I thought it would make sense to create a new up-to-date version that shows you step-by-step how to enable SSL for a WCF service with as little fuss as possible.
Let’s get started…
Dropbox REST API Part 2: API Requests
January 8, 2012
In the previous article, Dropbox REST API Part 1: Authentication, I showed you how you can obtain an access token using the Dropbox REST API and OAuth.
Once you have an access token, you can use it to access the main Dropbox REST API. Let’s demonstrate this by using some of the API’s requests such as retrieving account information and file (and directory) metadata.
It’s actually surprisingly easy. In the next part we’ll explore other options such as creating, deleting and moving folders.
Let’s get started…
Dropbox REST API Part 1: Authentication
December 29, 2011
I’ve been using Dropbox for about 6 months now. Before that I relied on Google Documents to share my files between the computers I use. Of course I had to login first and then I had to download them. Kind of a drag, certainly with big files.
With Dropbox that’s a thing of the past. Just install the client software and it will synchronize all of your files automatically. They are neatly downloaded into a local Dropbox folder on each of your computers. And only the parts of the file that actually changed are transferred, greatly reducing the download time.
Another neat feature is that other applications can use your Dropbox folder to store their data. For instance, I use a password manager (AgileBit’s 1Password) to securely save my login accounts. If I create a new account for a site on my laptop, then when I start my desktop it will automatically be known there once Dropbox has synched 1Password’s files (which is nearly instantanously).
This is made possible thanks to the Dropbox REST API. Let’s find out how we can use it…
Programming Windows Phone 7.5 Part 3: Stack Exchange API
December 3, 2011
Let’s finish up the Windows Phone programming series I started in October. The first part “Getting Started” guides you through the steps you need to follow in order to get up and running with Windows 7.5 (Mango) development. The second part is a quick guide on how you can easily create your own icons to brand your application. Please read them first if you haven’t done so yet.
It’s about time we actually made the application do something useful. For this I choose to use the small wrapper for the Stack Exchange API I made some time ago. It would be nice if I had a small application which allows me to check my StackOverflow profile.
You can download the code for my StackExchange API wrapper on the download page (2011: Article #58). As you’ll notice there are some things we’ll need to change in the existing code to make it work on a Windows Phone device.
Let’s get started…
Programming Windows Phone 7.5 Part 2: Icons
October 30, 2011
In the previous part of this series I mentioned that the next one would be about creating some icons for your Windows Phone application.
Took me about two weeks to get around to it. Been busy, switched employers and am now working for a client in Brussels. Happened to lose my phone on the train last Friday or it was stolen. I was in a Zombie-like state (it was early), so I don’t know. Remember putting it away, but when I did the 3 tap check [wallet - keys - phone] on the escalator it was gone … and so was my train by that time. I guess I won’t be deploying my apps any time soon.
Enough about me. Let’s create some icons. For a Windows Phone application you’ll need the following icons:
- Application Icon (62 x 62)
- Application Tile Image (173 x 173)
- Marketplace catalog icon (small) (99 x 99)
- Marketplate catalog icon (large) (173 x 173)
- Desktop application icon (200 x 200)
Luckily we’ll be using the PNG format for all of them. Let’s get started.
Programming Windows Phone 7.5 Part 1: Getting Started
October 16, 2011
Two weeks ago I wrote an article about using the Stack Exchange API. Turns out it got featured on Channel 9 last week. Cool.
In the video they wonder if there’s such a thing as a Stack Exchange application for the Windows Phone. There a few available, but it got me thinking if I could easily port the code to run on my Windows Phone.
I myself, haven’t developed much on the Windows Phone yet, apart from a few “Hello, World”-isch applications. Now that Mango (WP 7.5) has been officially released and I just reinstalled my PC, I figured this would be a good opportunity to get started with Windows Phone development.
Stack Exchange API
October 2, 2011
Two weeks ago I was playing around with the Stack Exchange API to see if it was easy to build a custom flair application. You know, this little guy:
How hard can it be to retrieve a user’s profile, badge count and reputation updates? Surely, Stack Exchange has an API. And they do…and it’s pretty easy to use. Let’s quickly cobble together a small sample application.
Writing a custom Json.NET DateTime Converter
September 25, 2011
Last weekend I was playing around with the Stack Exchange API. All the API responses are expressed in JSON. So I decided to use the Json.NET library to easily deserialize the JSON responses into simple .NET objects.
This library has great support for deserialing JSON into .NET objects and serializing them back into JSON. For example, if you want to serialize an object to a JSON string all you have to do is decorate the type with some attributes.
For example:
[JsonObject(MemberSerialization.OptIn)] public class Person { [JsonProperty] public string Name { get; set; } [JsonProperty] [JsonConverter(typeof(IsoDateTimeConverter))] public DateTime BirthDate { get; set; } }
Notice that for the BirthDate property a specific converter is specified (IsoDateTimeConverter). Sometimes it is not enough to tell Json.NET which properties should be serialized. You need to help it out a bit and inform it how the properties should be serialized / deserialized. Here the IsoDateTimeConverter informs Json.NET that it should serialize the birthdate into an ISO 8601 date format.
The Stack Exchange API uses Unix timestamps to express all of its timestamps. Out of the box Json.NET does not contain a converter that can handle this notation for DateTime properties. But luckily we can create our own. It’s actually very easy, let’s see how we can do this…
Google Data API (GData)
September 10, 2011
Yesterday on StackOverflow I came across a question about using the Google Data API (also called GData) in .NET. Questions about it regularly pop up. Retrieving my Google data in .NET somehow seems appealing to me, but maybe that’s just me. I never worked with it before, so I took some time to experiment with it a bit. Figured I’d better write it down, before I forget it again. This article is a quick introduction on using the Google Data API with the .NET Framework…so, let’s get started…







