Returns the list of available versions of an artifact
This method is call via GET <grapes_url>/artifact/<gavc>/versions

@param gavc String
@return Response String version in JSON
421108
@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/{gavc}" + ServerAPI.GET_LAST_VERSION)
    public Response getLastVersion(@PathParam("gavc") final String gavc){
        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Got a get artifact last version request. [%s]", gavc));
        }

        final String lastVersion = getArtifactHandler().getArtifactLastVersion(gavc);

        return Response.ok(lastVersion).build();
    }
731817
def get_version(self):
        """"""
        args = {"access_token": self.access_token}
        try:
            response = self.session.request(
                "GET",
                FACEBOOK_GRAPH_URL + self.version + "/me",
                params=args,
                timeout=self.timeout,
                proxies=self.proxies,
            )
        except requests.HTTPError as e:
            response = json.loads(e.read())
            raise GraphAPIError(response)

        try:
            headers = response.headers
            version = headers["facebook-api-version"].replace("v", "")
            return str(version)
        except Exception:
            raise GraphAPIError("API version number not available")
876089
def project_versions(self, project):
        
        r_json = self._get_json('project/' + project + '/versions')
        versions = [
            Version(self._options, self._session, raw_ver_json) for raw_ver_json in r_json]
        return versions
219447
def version(*names, **kwargs):
    '''
    
    '''
    ret = {}
    versions_as_list = \
        salt.utils.data.is_true(kwargs.pop('versions_as_list', False))
    pkg_glob = False
    if names:
        pkgs = __salt__['pkg.list_pkgs'](versions_as_list=True, **kwargs)
        for name in names:
            if '*' in name:
                pkg_glob = True
                for match in fnmatch.filter(pkgs, name):
                    ret[match] = pkgs.get(match, [])
            else:
                ret[name] = pkgs.get(name, [])
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    # Return a string if no globbing is used, and there is one item in the
    # return dict
    if len(ret) == 1 and not pkg_glob:
        try:
            return next(six.itervalues(ret))
        except StopIteration:
            return ''
    return ret
1199932
@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/{gavc}" + ServerAPI.SET_DO_NOT_USE)
    public Response getDoNotUse(@PathParam("gavc") final String gavc){
        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Got a get doNotUse artifact request [%s]", gavc));
        }

        final DbArtifact artifact = getArtifactHandler().getArtifact(gavc);

        return Response.ok(artifact.getDoNotUse()).build();
    }
753989
def versions_available(self):
        

        if self.version:
            spec = "%s==%s" % (self.project_name, self.version)
        else:
            spec = self.project_name

        if self.all_versions and self.version in self.all_versions:
            print_pkg_versions(self.project_name, [self.version])
        elif not self.version and self.all_versions:
            print_pkg_versions(self.project_name, self.all_versions)
        else:
            if self.version:
                self.logger.error("No pacakge found for version %s" \
                        % self.version)
            else:
                self.logger.error("No pacakge found for %s" % self.project_name)
            return 1
        return 0
406943
public function get_versions()
    {
        if (!$this->versions) {
            $this->versions = array();
            if ($json = $this->get_cache('versions')) {
                $this->versions = json_decode($json, true);
            }
        }

        return $this->versions;
    }
139381
@Restricted(NoExternalUse.class)
    public Iterator<VersionNumber> getVersionList() {
        TreeSet<VersionNumber> set = new TreeSet<VersionNumber>();
        for (VersionRange vr : data.values()) {
            if (vr.max != null) {
                set.add(vr.max);
            }
        }
        return set.iterator();
    }
1343939
public com.google.appengine.v1.VersionView getView() {
    com.google.appengine.v1.VersionView result = com.google.appengine.v1.VersionView.valueOf(view_);
    return result == null ? com.google.appengine.v1.VersionView.UNRECOGNIZED : result;
  }
505346
public ArrayList<OvhAvailableVersionEnum> serviceName_availableVersions_GET(String serviceName) throws IOException {
		String qPath = "/hosting/privateDatabase/{serviceName}/availableVersions";
		StringBuilder sb = path(qPath, serviceName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t4);
	}
198465
def get_versions(self):
        

        if not self.object_id:
            return []
        url = self.build_url(
            self._endpoints.get('versions').format(id=self.object_id))

        response = self.con.get(url)
        if not response:
            return []

        data = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return [DriveItemVersion(parent=self, **{self._cloud_data_key: item})
                for item in data.get('value', [])]
219775
def gav_data(gav)
      res = {}
      request = Typhoeus::Request.new(
      "#{host_url}/service/local/artifact/maven/resolve",
      :params  => gav.to_hash,:connecttimeout => 5,
      :headers => { 'Accept' => 'application/json' }
      )
      request.on_failure do |response|
        raise("Failed to get gav data for #{gav.to_s}")
      end
      request.on_complete do |response|
        res = JSON.parse(response.response_body)
      end
      request.run

      res['data']
    end
95783
public static DbArtifact createDbArtifact(final String gavc) {
        final DbArtifact artifact = new DbArtifact();
        final String[] artifactInfo = gavc.split(":");

        if(artifactInfo.length > 0){
            artifact.setGroupId(artifactInfo[0]);
        }

        if(artifactInfo.length > 1){
            artifact.setArtifactId(artifactInfo[1]);
        }

        if(artifactInfo.length > 2){
            artifact.setVersion(artifactInfo[2]);
        }

        if(artifactInfo.length > 3){
            artifact.setClassifier(artifactInfo[3]);
        }

        if(artifactInfo.length > 4){
            artifact.setExtension(artifactInfo[4]);
        }

        if(artifactInfo.length > 5){
            artifact.setOrigin(artifactInfo[5]);
        }

        return artifact;
    }
1051298
public static String[] extractNameVersionType(String url) {
		Matcher m = ARTIFACT_MATCHER.matcher(url);
		if (!m.matches()) {
			return new String[]{url.split("\\.")[0], DEFAULT_VERSION};
		} else {
			//CHECKSTYLE:OFF
			StringBuilder v = new StringBuilder();
			String d1 = m.group(1);
			String d2 = m.group(2);
			String d3 = m.group(3);
			String d4 = m.group(4);
			String d5 = m.group(5);
			String d6 = m.group(6);
			if (d2 != null) {
				v.append(d2);
				if (d3 != null) {
					v.append('.');
					v.append(d3);
					if (d4 != null) {
						v.append('.');
						v.append(d4);
						if (d5 != null) {
							v.append(".");
							cleanupModifier(v, d5);
						}
					} else if (d5 != null) {
						v.append(".0.");
						cleanupModifier(v, d5);
					}
				} else if (d5 != null) {
					v.append(".0.0.");
					cleanupModifier(v, d5);
				}
			}
			//CHECKSTYLE:ON
			return new String[]{d1, v.toString(), d6};
		}
	}
1347633
public static int compareOsgiVersions(String v1, String v2) {
		return Version.parseVersion(v1).compareTo(Version.parseVersion(v2));
	}
275191
@GwtIncompatible("java.util.ResourceBundle")
  public static String getReleaseVersion() {
    ResourceBundle config = ResourceBundle.getBundle(CONFIG_RESOURCE);
    return config.getString("compiler.version");
  }
197433
def get_swagger_versions(settings):
    
    swagger_versions = set(aslist(settings.get(
        'pyramid_swagger.swagger_versions', DEFAULT_SWAGGER_VERSIONS)))

    if len(swagger_versions) == 0:
        raise ValueError('pyramid_swagger.swagger_versions is empty')

    for swagger_version in swagger_versions:
        if swagger_version not in SUPPORTED_SWAGGER_VERSIONS:
            raise ValueError('Swagger version {0} is not supported.'
                             .format(swagger_version))
    return swagger_versions