Through the new VersionEye API you can get a list of all licenses for your software project. VersionEye now supports 7 different package managers. In this example I will use a Ruby Gemfile to demonstrate how easy it is to get the license list.
First of all you need to signup at VersionEye to get your API KEY. It’s free and takes less than 30 seconds. With your API KEY you can take advantage of the VersionEye API.
The “/api/v1/projects.json” resource supports file uploads via the API.
Just send your Gemfile via POST to this resource and receive a JSON object as response with all the dependencies in the file.
In the JSON response you will receive an “project_key”. This project key is unique per user. You can use it to fetch all licenses for the project. Just send a GET request to “/api/v1/projects/PROJECT_KEY/licenses.json?api_key=API_KEY” and you will receive the license list as JSON.
That’s it. You need only 2 Requests to get the licenses list. Let me know how you like it.
By the way. Of course you can send a Gemfile.lock, too. It’s up to you.