mirror of
				https://github.com/gitbucket/gitbucket.git
				synced 2025-11-03 20:15:59 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			418 B
		
	
	
	
		
			Scala
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			418 B
		
	
	
	
		
			Scala
		
	
	
	
	
	
import com.eclipsesource.json.Json
 | 
						|
import scala.collection.JavaConverters._
 | 
						|
 | 
						|
object PluginsJson {
 | 
						|
 | 
						|
  def getUrls(json: String): Seq[String] = {
 | 
						|
    val value = Json.parse(json)
 | 
						|
    value.asArray.values.asScala.map { plugin =>
 | 
						|
      val pluginObject = plugin.asObject
 | 
						|
      val latestVersionObject = pluginObject.get("versions").asArray.asScala.head.asObject
 | 
						|
      latestVersionObject.get("url").asString
 | 
						|
    }
 | 
						|
  }
 | 
						|
 | 
						|
}
 | 
						|
 |