Package net.rim.device.api.io.http

Examples of net.rim.device.api.io.http.HttpHeaders


  // Get the public feed
  SocialFeed publicFeed(int ps, int ind, String sort) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/socialfeed?ps=" + ps + "&ind=" + ind + "&sort=" + sort + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here


  // Get Next Photo
  Photo next(long photoId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/photos/" + photoId + "/next" + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  // Get Previous Photo
  Photo previous(long photoId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/photos/" + photoId + "/previous" + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  // Get Photo Metadata
  Photo photoMetaData(long photoId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/photos/" + photoId + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  // Get the user profile
  Profile userProfile(long userId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200 && m_httpStatus != 201) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  // Get the user profile
  Profile userProfile(String userName) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userName + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200 && m_httpStatus != 201) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  Settings settings(long userId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/settings" + ";deviceside=true";
   
    try {         
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200 && m_httpStatus != 201) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  TweetPhotoResponse view(long userId, long photoId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/views/" + photoId + ";deviceside=true";
   
    try {         
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "POST", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 201) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  TweetPhotoResponse vote(long photoId, String voteCast) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/photos/" + photoId + "/" + voteCast + ";deviceside=true";
   
    try {         
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "PUT", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  // Get favorite status for a photo
  FavoriteQueryResponse favoriteStatus(long userId, long photoId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/favorites/" + photoId + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

TOP

Related Classes of net.rim.device.api.io.http.HttpHeaders

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.