mas-mob-app-devs/techbook-app — pull request #14 by Kakarot (2013-11-26 21:10:10+00:00)
Title: Implemented Cookie Functionality, APIs, Post.Class, and more JUnits

The cookie functionality now works, granted if you test it make sure to put your cookie information inside the API constructor, just in case mine expires, but I don't mind either way if you use mine.

Implemented MyCourses API (both cookie and debugging with specific username)

Implemented GetThreads API which returns all the data about a thread, as well as the attached post. The logic for parsing this confused for awhile, due to a JSONArray being inside an JSONObject, which was indexed by the key "posts" while the array naturally had objects and keys of it's own.

However the way to understand how I handled this (as far as using it goes). Basically I return a single Topic object which contains all the data (prismID, subject, first_post, timestamp) of the thread. Then for the attached JSONArray, I made a List of Post objects List which contains all the information for each post. The size of the list is the amount of post there are for that thread, not including the first_post which is pulled from the thread itself.

I did some basic Javadocs for these APIs as I realize it can get confusing when actually using them.

I've also tested all these APIs with JUnits and am including them, both for help in debugging, and help understanding how I instantiate the APIs

My next goal will be learning how to do the "Post" command with Restlet.

![screen shot 2013-11-25 at 11 57 54 pm](https://f.cloud.github.com/assets/1477346/1626318/0abb57cc-56df-11e3-8bd3-ab70d82b26c5.png)