wisdom

command module
v0.0.0-...-0811cb5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2015 License: MIT Imports: 11 Imported by: 0

README

Wisdom

Wisdom is a Startup Quote API.

The idea is to provide an access to famous quotes by people from startup ecosystem that can be reused by developer inside their apps.

Potential apps is like Product Hunt, Beta List and other related startup community.

Mission

  1. Simple
  2. Fast (because it's written in Go)
  3. Open for everyone (no authentication required)

API

Object
Quote

example

{
    "id": 13,
    "post_id": "104365553355",
    "author": {
        "id": 12,
        "avatar_url": "",
        "name": "Leslie Bradshaw",
        "company": "JESS3",
        "twitter_username": "lesliebradshaw"
    },
    "content": "In my 20s I was thrashing around in the water, trying to keep my head above it. In my 30s, I realized it was only three feet deep and I stood up.",
    "permalink": "http://startupquote.com/post/104365553355",
    "picture_url": "http://36.media.tumblr.com/bc0698c00b443d0e5c6b9b814d74bbd9/tumblr_nfywvtqr2C1qz6pqio1_r1_1280.png",
    "tags": [
        {
            "id": 26,
            "label": "entrepreneur"
        },
        {
            "id": 27,
            "label": "founder"
        }
    ]
}
Author

example

{
    "id": 1,
    "avatar_url": "",
    "name": "Reid Hoffman",
    "company": "Linkedin",
    "twitter_username": "reidhoffman"
}
Tag

example

{
    "id": 1,
    "label": "launch"
}
Random
Endpoint Description
/v1/random return a random quote
Example request
GET https://wisdomapi.herokuapp.com/v1/random
Author
Endpoint Description
/v1/authors return an array of author
/v1/author/:twitter_username return an array of quote by author that have given :twitter_username. If author doesn't have twitter account response will be 404
/v1/author/:twitter_username/random return a random quote by author that have given :twitter_username. If author only have 1 quote the response will be exactly the same, not random.

:twitter_username is a string

Example request
# List of author
GET https://wisdomapi.herokuapp.com/v1/authors

# List of quotes by Paul Graham (@paulg)
GET https://wisdomapi.herokuapp.com/v1/author/paulg

# Random quote by Paul Graham (@paulg)
GET https://wisdomapi.herokuapp.com/v1/author/paulg/random
Tags
Endpoint Description
/v1/tags return an array of tag
Example request
# List of tags
GET https://wisdomapi.herokuapp.com/v1/tags

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
Package pq is a pure Go Postgres driver for the database/sql package.
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
Package oid contains OID constants as defined by the Postgres server.

Jump to

Keyboard shortcuts

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