readme-score-api

command module
v0.0.0-...-2b00955 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2019 License: MIT Imports: 19 Imported by: 0

README

readme-score-api Readme Score

An HTTP API for readme-score

Usage

  • The root URL is currently http://readme-score-api.herokuapp.com
  • The endpoint you want to use is /score
  • The URL query parameter you want to use is url
  • .txt, .json, .svg are recognized formats. If something else is used, the response defaults to .json
  • Scores are currently cached for 1 hour, unless you send a force query parameter. Please don't abuse this.
Score Data - Text
$ curl http://readme-score-api.herokuapp.com/score.txt?url=rails/rails -I
Content-Type: text/plain

55
Score Data - JSON
$ curl http://readme-score-api.herokuapp.com/score.json?url=rails/rails -I
Content-Type: application/json

{
  "score": 55,
  "url": "rails/rails",
  "breakdown": {
    "cumulative_code_block_length": 0.09001482,
    "has_lists?": 10,
    "low_code_block_penalty": 0,
    "number_of_code_blocks": 15,
    "number_of_gifs": 0,
    "number_of_images": 0,
    "number_of_non_code_sections": 30
  }
}
Score Data - SVG
$ curl http://readme-score-api.herokuapp.com/score.svg?url=rails/rails -i
Cache-Control: no-cache
Content-Type: image/svg+xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="80px" height="18px" viewBox="0 0 80 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
    <!-- ... --!>
</svg>

Apology

I'm not very awesome at Go, so I'm sorry in advance

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/martini-contrib/cors
Package cors provides handlers to enable CORS support.
Package cors provides handlers to enable CORS support.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL