Skip to content

Commit

Permalink
Implemented com.udacity.api Requests
Browse files Browse the repository at this point in the history
All requests are now implemented through
GSON constructed requests built on API
objects.  There is still some addtional
mopping up to do within Connection. Also
login fail now re-prompts for credentials

  FIXED: com.udacity.api now owns most of
	     the brittle API constants
  FIXED: now repompt on assumed user typos
	     in credentials
  • Loading branch information
3jb committed Oct 25, 2012
1 parent 3840a90 commit ae6dc54
Show file tree
Hide file tree
Showing 39 changed files with 215 additions and 157 deletions.
4 changes: 2 additions & 2 deletions doc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:16 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:45 PDT 2012 -->
<TITLE>
All Classes
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions doc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:16 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:45 PDT 2012 -->
<TITLE>
All Classes
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
Connection.AsyncJSONGetTask
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down Expand Up @@ -53,7 +53,7 @@

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.html" title="class in com.appittome.udacity.client"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncGSONGetTask.html" title="class in com.appittome.udacity.client"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONPostTask.html" title="class in com.appittome.udacity.client"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/appittome/udacity/client/Connection.AsyncJSONGetTask.html" target="_top"><B>FRAMES</B></A> &nbsp;
Expand Down Expand Up @@ -226,7 +226,7 @@ <H2>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.html" title="class in com.appittome.udacity.client"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncGSONGetTask.html" title="class in com.appittome.udacity.client"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONPostTask.html" title="class in com.appittome.udacity.client"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/appittome/udacity/client/Connection.AsyncJSONGetTask.html" target="_top"><B>FRAMES</B></A> &nbsp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
Connection.AsyncJSONPostTask
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down Expand Up @@ -139,7 +139,7 @@ <H2>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;JSONObject</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONPostTask.html#doInBackground(JSONObject...)">doInBackground</A></B>(JSONObject...&nbsp;jsonArray)</CODE>
<TD><CODE><B><A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONPostTask.html#doInBackground(java.lang.Object...)">doInBackground</A></B>(java.lang.Object...&nbsp;objArray)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Asynchronously POST JSONObect to URL+AJAX_SPEC</TD>
Expand Down Expand Up @@ -184,15 +184,15 @@ <H2>
</TR>
</TABLE>

<A NAME="doInBackground(JSONObject...)"><!-- --></A><H3>
<A NAME="doInBackground(java.lang.Object...)"><!-- --></A><H3>
doInBackground</H3>
<PRE>
protected JSONObject <B>doInBackground</B>(JSONObject...&nbsp;jsonArray)</PRE>
protected JSONObject <B>doInBackground</B>(java.lang.Object...&nbsp;objArray)</PRE>
<DL>
<DD>Asynchronously POST JSONObect to URL+AJAX_SPEC
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>jsonArray</CODE> - JSON to be POSTed to server on URL+AJAX_SPEC
<DT><B>Parameters:</B><DD><CODE>objArray</CODE> - Objects to be POSTed to server on URL+AJAX_SPEC
Note: don't actually POST an array of objects, this
will only return the response from the last object.
<DT><B>Returns:</B><DD>JSONObject the json response from URL+AJAX_SPEC</DL>
Expand Down
4 changes: 2 additions & 2 deletions doc/com/appittome/udacity/client/Connection.GrabPageTask.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
Connection.GrabPageTask
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
Connection.OnConnectionReadyListener
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
Connection.OnNewCsrfTokenListener
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
16 changes: 12 additions & 4 deletions doc/com/appittome/udacity/client/Connection.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
Connection
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down Expand Up @@ -54,7 +54,7 @@
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONGetTask.html" title="class in com.appittome.udacity.client"><B>NEXT CLASS</B></A></FONT></TD>
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncGSONGetTask.html" title="class in com.appittome.udacity.client"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/appittome/udacity/client/Connection.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Connection.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
Expand Down Expand Up @@ -120,6 +120,14 @@ <H2>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/appittome/udacity/client/Connection.AsyncGSONGetTask.html" title="class in com.appittome.udacity.client">Connection.AsyncGSONGetTask</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONGetTask.html" title="class in com.appittome.udacity.client">Connection.AsyncJSONGetTask</A></B></CODE>

<BR>
Expand Down Expand Up @@ -478,7 +486,7 @@ <H2>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncJSONGetTask.html" title="class in com.appittome.udacity.client"><B>NEXT CLASS</B></A></FONT></TD>
&nbsp;<A HREF="../../../../com/appittome/udacity/client/Connection.AsyncGSONGetTask.html" title="class in com.appittome.udacity.client"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/appittome/udacity/client/Connection.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Connection.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
Expand Down
4 changes: 2 additions & 2 deletions doc/com/appittome/udacity/client/CourseArrayAdapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:14 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
CourseArrayAdapter
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions doc/com/appittome/udacity/client/HttpURLResponse.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
HttpURLResponse
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions doc/com/appittome/udacity/client/NuggetArrayAdapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
NuggetArrayAdapter
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
SignInCredentials.NullCredentialsException
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
16 changes: 8 additions & 8 deletions doc/com/appittome/udacity/client/SignInCredentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
SignInCredentials
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down Expand Up @@ -265,11 +265,11 @@ <H2>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;JSONObject</CODE></FONT></TD>
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/appittome/udacity/client/SignInCredentials.html#toJSON()">toJSON</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this Credentials object to a Udacity login JSONObject.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this Credentials object to a Udacity.api.Request.loginRequest Object.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
Expand Down Expand Up @@ -526,17 +526,17 @@ <H2>
<A NAME="toJSON()"><!-- --></A><H3>
toJSON</H3>
<PRE>
public JSONObject <B>toJSON</B>()
throws <A HREF="../../../../com/appittome/udacity/client/SignInCredentials.NullCredentialsException.html" title="class in com.appittome.udacity.client">SignInCredentials.NullCredentialsException</A></PRE>
public java.lang.Object <B>toJSON</B>()
throws <A HREF="../../../../com/appittome/udacity/client/SignInCredentials.NullCredentialsException.html" title="class in com.appittome.udacity.client">SignInCredentials.NullCredentialsException</A></PRE>
<DL>
<DD>Converts this Credentials object to a Udacity login JSONObject.
<DD>Converts this Credentials object to a Udacity.api.Request.loginRequest Object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a JSONObect representing this credentials object as necessary for
<DT><B>Returns:</B><DD>a Obect representing this credentials object as necessary for
the Udacity login.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../com/appittome/udacity/client/SignInCredentials.NullCredentialsException.html" title="class in com.appittome.udacity.client">SignInCredentials.NullCredentialsException</A></CODE></DL>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
SwipeAdapter.OnListClickListener
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
SwipeAdapter.UdacityListFragment
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions doc/com/appittome/udacity/client/SwipeAdapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Mon Oct 15 17:01:15 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_24) on Wed Oct 24 23:10:44 PDT 2012 -->
<TITLE>
SwipeAdapter
</TITLE>

<META NAME="date" CONTENT="2012-10-15">
<META NAME="date" CONTENT="2012-10-24">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

Expand Down
Loading

0 comments on commit ae6dc54

Please sign in to comment.