""" # Alternately, fill in you app's credentials here: clientKey = "" clientSecret = "" appSessionId = "" apiServer = "https://api.basespace.illumina.com/" # or 'https://api.cloud-hoth.illumina.com/' apiVersion = "v1pre3" # First we will initialize a BaseSpace API object using our app information and the appSessionId if clientKey: myAPI = BaseSpaceAPI(clientKey, clientSecret, apiServer, apiVersion, appSessionId) else: myAPI = BaseSpaceAPI(profile="DEFAULT") # First, let's grab the genome with id=4 myGenome = myAPI.getGenomeById("4") print "\nThe Genome is " + str(myGenome) print "We can get more information from the genome object" print "Id: " + myGenome.Id print "Href: " + myGenome.Href print "DisplayName: " + myGenome.DisplayName # Get a list of all genomes allGenomes = myAPI.getAvailableGenomes() print "\nGenomes \n" + str(allGenomes) # Let's have a look at the current user user = myAPI.getUserById("current") print "\nThe current user is \n" + str(user) # Now list the projects for this user
# FILL IN WITH YOUR APP VALUES HERE! client_key = "" client_secret = "" AppSessionId = "" accessToken = "" # test if client variables have been set helper.checkClientVars({'client_key':client_key,'client_secret':client_secret,'AppSessionId':AppSessionId}) BaseSpaceUrl = 'https://api.cloud-endor.illumina.com/' version = 'v1pre3' # First, create a client for making calls for this user session myAPI = BaseSpaceAPI(client_key, client_secret, BaseSpaceUrl, version, AppSessionId,AccessToken=accessToken) # First, let's grab the genome with id=4 myGenome = myAPI.getGenomeById('4') print "\nThe Genome is " + str(myGenome) print "We can get more information from the genome object" print 'Id: ' + myGenome.Id print 'Href: ' + myGenome.Href print 'DisplayName: ' + myGenome.DisplayName # Get a list of all genomes allGenomes = myAPI.getAvailableGenomes() print "\nGenomes \n" + str(allGenomes) # Let's have a look at the current user user = myAPI.getUserById('current') print "\nThe current user is \n" + str(user) # Now list the projects for this user
""" # Alternately, fill in you app's credentials here: clientKey = "" clientSecret = "" appSessionId = "" apiServer = 'https://api.basespace.illumina.com/' # or 'https://api.cloud-hoth.illumina.com/' apiVersion = 'v1pre3' # First we will initialize a BaseSpace API object using our app information and the appSessionId if clientKey: myAPI = BaseSpaceAPI(clientKey, clientSecret, apiServer, apiVersion, appSessionId) else: myAPI = BaseSpaceAPI(profile='DEFAULT') # First, let's grab the genome with id=4 myGenome = myAPI.getGenomeById('4') print("\nThe Genome is " + str(myGenome)) print("We can get more information from the genome object") print('Id: ' + myGenome.Id) print('Href: ' + myGenome.Href) print('DisplayName: ' + myGenome.DisplayName) # Get a list of all genomes allGenomes = myAPI.getAvailableGenomes() print("\nGenomes \n" + str(allGenomes)) # Let's have a look at the current user user = myAPI.getUserById('current') print("\nThe current user is \n" + str(user)) # Now list the projects for this user