Kiwi

Curation and Parsing services

The Kiwi API was implemented in Scala. It consists of two logical services: Curation and Parsing.

The Curation service manages Vesperin’s curation operations, such as basic code transformations and refactorings, code presentation, and publication (published on Twitter). The Parsing service manages the access to a Java parsing API, built on top of Eclipse JDT1.

All requests are, by default, provided as JSON. There is no authentication required to make Curation and Parsing API calls.

Kiwi HTTP layer uses the Spray2 framework to build a REST/HTTP-based integration layer. This layer is responsible for serving HTTP requests. It has the following HTTP endpoints as an API:

  1. POST /kiwi/eval? {curation command}
  2. PUT /kiwi/eval? {persist code command}
  3. GET /kiwi/find?q={query text}
  4. GET /kiwi/render?id={code id}

Here is an example of a curation command (e.g., Rename method):

{"rename": {
  "what": "method",
  "where": [1, 6],
  "source": {
    "name": "...",
    "description": "...",
    "content": "..."
  }
 }
}

Kiwi’s source code is still private. However, once it becomes public, it will be available here.

If you want to get access to this code, please send me an email.

  1. http://www.eclipse.org/jdt/ 

  2. http://spray.io/