...
 
Commits (2)
......@@ -43,15 +43,15 @@ module IntelliJ
def suggest_plugin(name, edition)
product = product_edition_code(edition)
response = request_json_response("https://plugins.jetbrains.com/search/suggest?product=#{product}&term=#{name}")
response = request_json_response("https://plugins.jetbrains.com/api/searchSuggest?isIDERequest=false&product=#{product}&term=#{name}")
result = {}
response.each do |suggestion|
name = suggestion['value']
id = suggestion['data']['url'].match(/\/plugin\/(\d+)-.*/)[1]
id = suggestion['url'].match(/\/plugin\/(\d+)-.*/)[1]
result[name] = {}
result[name]['id'] = id
result[name]['name'] = name
result[name]['family'] = suggestion['data']['target']
result[name]['family'] = suggestion['target']
end
result
end
......