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

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


  TweetPhotoResponse deleteFavorite(long userId, long photoId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/favorites/" + photoId;

    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "DELETE", this, false);
          m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here


  AddPhotoCommentResponse comment(long userId, long photoId, String commentText) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/comments/" + photoId + ";deviceside=true";

    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), commentText.getBytes(), getCoverageBasedConnectionType(), "POST", this, false);
          m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 201) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

  TweetPhotoResponse deleteComment(long userId, long photoId, long commentId) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/comments/" + photoId + "/" + commentId + ";deviceside=true";

    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "DELETE", this, false);
          m_httpStatus = httpConn.getResponseCode();

      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

    // Get friends
    Profiles friends(long userId, int ps, int ind, String sort) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/friends?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

   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/link" + ";deviceside=true";

    try {         
      String xmlBlob = "<LinkedProfile xmlns=\"http://tweetphotoapi.com\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><APIKey>" + apiKey + "</APIKey><IdentitySecret>" + identitySecret + "</IdentitySecret><IdentityToken>" + identityToken + "</IdentityToken><Service>" + serviceName + "</Service></LinkedProfile>";
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), xmlBlob.getBytes(), getCoverageBasedConnectionType(), "POST", this, false);
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

    TweetPhotoResponse unlinkService(String serviceName) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/unlink/" + serviceName + ";deviceside=true";

    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "DELETE", this, false);
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
View Full Code Here

    Profiles linkedServices() {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/profiles" + ";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 all friends
    Profiles friends(long userId, String sort) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/friends?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 photo viewers
    Profiles photoViewers(long photoId, int ps, int ind) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/photos/" + photoId + "/viewers?ps=" + ps + "&ind=" + ind + "&sort=desc" + ";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 comments by user
    Comments photoCommentsByUser(long userId, int ps, int ind, String sort) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/users/" + userId + "/photos/comments?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

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.