• Stars
    star
    462
  • Rank 94,832 (Top 2 %)
  • Language
    C#
  • Created almost 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Programming Quotes API for open source projects.

Programming Quotes API

Programming Quotes API for open source projects.

Convention: The names of the authors are as on Wikipedia.

Development

Start the project locally:

dotnet build
dotnet watch run

Listening on: http://localhost:5000 and https://localhost:5001

API Documentation

GET /quotes (get all quotes)

GET /quotes/random (get random quote)

GET /quotes/5a6ce86f2af929789500e824 (get quote by id)

GET /quotes/author/Edsger W. Dijkstra (get quote by author)

You can also POST, PUT, PATCH and DELETE. See Swagger docs for more.

Author info

You can use Wikipedia API for author's image and info.

To get author's image:

https://en.wikipedia.org/w/api.php?action=query&titles=Fred%20Brooks&prop=pageimages&format=json&pithumbsize=250

To get author info:

https://en.wikipedia.org/w/api.php?action=query&titles=Fred%20Brooks&prop=extracts&format=json&exintro=1

Note that you can change titles, pithumbsize and other params. The %20 character (as in Fred%20Brooks) is for empty space.

Tutorials

TODO

  • add favorite quotes
    • BUG: adding but not preserving
  • deploy on server
  • return Task
  • mapLeft?
  • add async?