Package com.aetrion.flickr

Examples of com.aetrion.flickr.REST


        //turn on debugging
        Flickr.debugStream = true;
        Flickr.debugRequest = true;
        Flickr flickr = new Flickr(
                key,shared,
                new REST()
        );

        /*
        //
        RequestContext context = RequestContext.getRequestContext();
View Full Code Here


        new Thread(new Runnable(){
            public void run() {
                try {
                    Flickr flickr = new Flickr(
                            key,shared,
                            new REST()
                    );

                    AuthInterface authInterface = flickr.getAuthInterface();
                    Auth auth = authInterface.checkToken(context.getSettings().getProperty(FLICKR_USER_TOKEN));
                    RequestContext context = RequestContext.getRequestContext();
View Full Code Here

        private void authenticate() throws ParserConfigurationException, IOException, SAXException {
            Flickr.debugStream = true;
            Flickr.debugRequest = true;
            Flickr flickr = new Flickr(
                    key,shared,
                    new REST()
            );
            final RequestContext context = RequestContext.getRequestContext();
            //ask user to authenticate on the web
            final AuthInterface authInterface = flickr.getAuthInterface();
            try {
View Full Code Here

     */
    public Uploader(String apiKey, String sharedSecret) {
        try {
            this.apiKey = apiKey;
            this.sharedSecret = sharedSecret;
            this.transport = new REST();
            this.transport.setResponseClass(UploaderResponse.class);
        } catch (ParserConfigurationException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

    {
      // TODO: Missing properties error handle.
      return null;
    }

    REST rest = null;
    try
    {
      rest = new REST();
    }
    catch (ParserConfigurationException e)
    {
      e.printStackTrace();
      return null;
    }
   
      Properties systemSettings = System.getProperties();
     
      //
      // Look for a proxy setting
      //       
      String proxyHost = Program.getProperty("general.proxyHost");
      String proxyPortString = "";
     
      if( proxyHost != null && proxyHost != "" )
      {
        proxyPortString = Program.getProperty("general.proxyPort");
      }
      else
      {
        proxyHost = (String) systemSettings.get("http.proxyHost" );
        proxyPortString = (String) systemSettings.get("http.proxyPort");
      }
     
      if( proxyHost != null && proxyHost != "" )
      {
      int proxyPort;
      try
      {
        proxyPort = Integer.parseInt(proxyPortString);
      }
      catch (NumberFormatException e1)
      {
        proxyPort = 8080; // Try a default.
      }
       
        rest.setProxy(proxyHost, proxyPort);
    }
     
    String sPhotoCount = Program.getProperty( "flickr.photoCount" );
    int photoCount = 25;
    try
View Full Code Here

  public FlickrLoader(PApplet pa, String flickrKey, String flickrSecret, SearchParameters sp, long sleepTime) {
    super(sleepTime);
    this.pa = pa;
   
    try {
      f = new Flickr(flickrKey, flickrSecret, new REST());
    } catch (ParserConfigurationException e) {
      e.printStackTrace();
    }
    authInterface  = f.getAuthInterface();
    requestContext   = RequestContext.getRequestContext();
View Full Code Here

TOP

Related Classes of com.aetrion.flickr.REST

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.