Skip to content

An API to get interesting tech-related quotes (powered by GitHub pages)

License

Notifications You must be signed in to change notification settings

FullStackBulletin/tech-quotes

Repository files navigation

tech-quotes

main JavaScript Style Guide ts

An API to get interesting tech-related quotes (powered by GitHub pages)

Usage

The base URL of the API is https://fullStackbulletin.github.io/tech-quotes.

API Documentation is available as OpenAPI specification:

Open API V3

There are some endpoints available:

/quotes/stats.json

Returns statistics about all the available quotes.

Example

curl https://fullStackbulletin.github.io/tech-quotes/quotes/stats.json | jq .

Returns

{
  "total": 53,
  "all": "https://fullStackbulletin.github.io/tech-quotes/quotes/all.json",
  "first": "https://fullStackbulletin.github.io/tech-quotes/quotes/0.json",
  "last": "https://fullStackbulletin.github.io/tech-quotes/quotes/52.json",
  "urlPrefix": "https://fullStackbulletin.github.io/tech-quotes/quotes"
}

/quotes/all.json

Returns all the quotes

Example

curl https://fullStackbulletin.github.io/tech-quotes/quotes/all.json | jq .

Returns

{
  "metadata": {
    "total": 53,
    "first": 0,
    "last": 52
  },
  "quotes": [
    {
      "id": 0,
      "text": "Technology is anything that wasn't around when you were born",
      "author": {
        "id": "alan-kay",
        "name": "Alan Kay",
        "description": "Computer Scientist",
        "wiki": "https://en.wikipedia.org/wiki/Alan_Kay",
        "url": "https://fullStackbulletin.github.io/tech-quotes/authors/alan-kay.json"
      },
      "url": "https://fullStackbulletin.github.io/tech-quotes/quotes/0.json"
    },
    {
      "id": 1,
      "text": "Any sufficiently advanced technology is equivalent to magic",
      "author": {
        "id": "arthur-c-clarke",
        "name": "Arthur C. Clarke",
        "description": "Author",
        "wiki": "https://en.wikipedia.org/wiki/Arthur_C._Clarke",
        "url": "https://fullStackbulletin.github.io/tech-quotes/authors/arthur-c-clarke.json"
      },
      "url": "https://fullStackbulletin.github.io/tech-quotes/quotes/1.json"
    },
    {
      "//": "...",
    }
  ]
}

/quotes/{quoteId}.json

Gets a single quote by ID:

Example

curl https://fullStackbulletin.github.io/tech-quotes/quotes/17.json | jq .

Returns

{
  "id": 17,
  "text": "The art challenges the technology, and the technology inspires the art",
  "author": {
    "id": "john-lasseter",
    "name": "John Lasseter",
    "description": "Director",
    "wiki": "https://en.wikipedia.org/wiki/John_Lasseter",
    "url": "https://fullStackbulletin.github.io/tech-quotes/authors/john-lasseter.json"
  },
  "url": "https://fullStackbulletin.github.io/tech-quotes/quotes/17.json"
}

/authors/stats.json

Gets statistics abouts the authors

Example

curl https://fullStackbulletin.github.io/tech-quotes/authors/stats.json | jq .

Returns

{
  "total": 51,
  "all": "https://fullStackbulletin.github.io/tech-quotes/authors/all.json",
  "urlPrefix": "https://fullStackbulletin.github.io/tech-quotes/authors"
}

/authors/all.json

Gets the list of all available authors

Example

curl https://fullStackbulletin.github.io/tech-quotes/authors/all.json | jq .

Returns

{
  "metadata": {
    "total": 51
  },
  "authors": [
    "alan-kay",
    "arthur-c-clarke",
    "mark-kennedy",
    "thomas-edison",
    "albert-einstein",
    "elbert-hubbard",
    "douglas-adams",
    "...",
    "john-brunner"
  ]
}

/authors/{authorId}.json

Gets the details and the quote of a given author

Example

curl https://fullStackbulletin.github.io/tech-quotes/authors/andrew-s-tanenbaum.json | jq .

Returns

{
  "id": "andrew-s-tanenbaum",
  "name": "Andrew S. Tanenbaum",
  "description": "Computer Scientist",
  "wiki": "https://en.wikipedia.org/wiki/Andrew_S._Tanenbaum",
  "url": "https://fullStackbulletin.github.io/tech-quotes/authors/andrew-s-tanenbaum.json",
  "quotes": [
    {
      "id": 31,
      "text": "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway",
      "url": "https://fullStackbulletin.github.io/tech-quotes/quotes/31.json"
    }
  ]
}

Suggest a quote

If you want to suggest a new tech quote here's how you can do that.

  • Fork this repository
  • Edit the file src/quotes.ts and append the new fact at the bottom (make sure to follow the spec provided by the specific TypeScript types).
  • Run npm run test && npm run build
  • If all looks good, commit your changes
  • Open a PR against the original repository

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

About

An API to get interesting tech-related quotes (powered by GitHub pages)

Resources

License

Stars

Watchers

Forks

Packages

No packages published