Package org.eclipse.egit.github.core.service

Examples of org.eclipse.egit.github.core.service.GistService.deleteGist()


          gist = (Gist)gists.get(i);
         
          if(gist.getDescription().toUpperCase().contains(serialNumber.toUpperCase())){ //found the last matching gist. toUpperCase is because Windows capitalizes the letters I hope this isn't a problem!
                if(foundMatchingGist==true){ //if one has already been found then an extra was made in error and needs to be cleaned up
                  //delete the spurious gist
                  service.deleteGist(gist.getId());
                }else if(gist.isPublic()==!makePrivate){// rewrite the gist if there is already one and the privacy settings are the same
                  for (String key : gist.getFiles().keySet()) {// "delete" old ones, if this wasn't here every time you saved a sketch with a new name it would not overwrite the old sketch
                    boolean matchingFile=false;
                    for(int j =0; j<theSketches.length; j++){
                      if((theSketches[j].getPrettyName()+"."+theSketches[j].getExtension()).contains(gist.getFiles().get(key).getFilename())){
View Full Code Here


                  service.updateGist(gist);
                  deleteGistsOnOtherAccounts(username, serialNumber);
                  System.out.println(new String("You can find the source online at: " + gist.getHtmlUrl()));
                  foundMatchingGist=true;
                }else{ //if the privacy settings have changed, delete the file and make a new one
                  service.deleteGist(gist.getId());
                  foundMatchingGist=false;
                }
          }
        }
        if(foundMatchingGist==false){ //if no gist exists for the board
View Full Code Here

              List<Gist> gists = service.getGists(username);
              //Boolean foundMatchingGist=false;
              for (int i = gists.size(); --i >= 0;){
                gist = (Gist)gists.get(i);
                if(gist.getDescription().toUpperCase().contains(serialNumber.toUpperCase())){ //found the last matching gist. toUpperCase is because Windows capitalizes the letters I hope this isn't a problem!
                     service.deleteGist(gist.getId());
                }
              }
            }catch(Exception e){
              System.out.println("Some login credentials are incorrect, please correct gistCredentials.txt");
              System.out.println(e);
View Full Code Here

          for (int i = gists.size(); --i >= 0;){  //backwards so the first one found is the oldest one
            newGist = (Gist)gists.get(i);
            if(newGist.getDescription().toUpperCase().contains(serialNumber.toUpperCase())){ //found the last matching gist , uppercase because windows capitalizes everything...
              if(foundMatchingGist==true){ //if one has already been found then an extra was made in error and needs to be cleaned up
                //delete the spurious gist
                service.deleteGist(newGist.getId());
              }else{
                newGist=service.getGist(newGist.getId());//get it again because the other capture only gets the meta-data
                if(!foundFirstGist){
                  gist=newGist;
                  foundFirstGist=true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.