com.sola.instagram.model
Class Media.Caption

java.lang.Object
  extended by com.sola.instagram.model.Media.Caption
Enclosing class:
Media

public class Media.Caption
extends java.lang.Object

Object for a media caption with the JSON representation

        { 
                "created_time":"",
                "text":"",
                "from": {
                        "username":"",
                        "profile_picture":"",
                        "id":"",
                        "full_name":""
                },
                "id":""
        }
 

Version:
2012-08-22
Author:
Sola Ogunsakin

Constructor Summary
Media.Caption(JSONObject captionObject)
          Makes a new caption object out of a JSONObject
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks if two caption objects are equal
 java.lang.String getCreatedTimestamp()
          Returns the caption's creation timestamp as a string
 User getFrom()
          Returns the creator of this caption
 java.lang.String getId()
          Returns id of this caption
 java.lang.String getText()
          Returns the text for this caption
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Media.Caption

public Media.Caption(JSONObject captionObject)
              throws JSONException
Makes a new caption object out of a JSONObject

Parameters:
captionObject - json object used to create this caption
Throws:
JSONException
Method Detail

getText

public java.lang.String getText()
Returns the text for this caption

Returns:
The text for this caption

getCreatedTimestamp

public java.lang.String getCreatedTimestamp()
Returns the caption's creation timestamp as a string

Returns:
The caption's creation timestamp as a string

getFrom

public User getFrom()
Returns the creator of this caption

Returns:
The creator of this caption

getId

public java.lang.String getId()
Returns id of this caption

Returns:
The id of this caption

equals

public boolean equals(java.lang.Object o)
Checks if two caption objects are equal

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to be compared
Returns:
True of the two objects are equal, false otherwise