mas-mob-app-devs/techbook-app — pull request #12 by Kakarot (2013-11-26 05:17:14+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/1619516/d87d2518-5659-11e3-840b-eac4f54d9940.png)