lukepeavey / quotable Goto Github PK
View Code? Open in Web Editor NEWRandom Quotes API
License: MIT License
Random Quotes API
License: MIT License
api.quotable.io is currently not working. Tried from multiple pc and IP address to verify. As well as checked isitdownrightnow.com to verify.
The Request
What would be really nice is the ability to use a GET parameter to specify the maximum or minimum length of a desired quote.
like this:
Expected Behavior:
https://api.quotable.io/random?maxlen=50
=> gives a random quote with a length of no more than 50 characters
https://api.quotable.io/random?minlen?=20
=> gives a quote with at least 20 char length.
and so on.
Suggestions
Adding a length entry and then sorting the database by length. Now get the section that has 0 to n characters and select a random one.
Originally posted by khushalpatel1 June 17, 2022
Hello sir api is not woring please help...
Jan 6 2020
API was down from 12pm to 8pm.
For Each Quotes, add genre as parameter and we can filter based on it. I can see that tag is also used for same purpose but not exactly the same.
I wonder if there is a way to get quotes just from one or several selected authors?
like
GET /random?authorid=zgMVt2guVo7p,qsaptKSHuLDU
or
GET /random?author="Zig Ziglar","Laozi"
Add support for page number based pagination. This approach is simpler and more intuitive. It also requires less code on the client side to implement common pagination patterns.
This feature can be added on top of the current API without any breaking changes.
Get the second page of results, with 50 results per page.
GET /quotes?page=2&limit=50
Add a page
parameter to all paginated endpoints. This parameter can be used to specify the page of results to return. The limit
param determines the number of results per page.
We can add the following properties to all paginated responses. We do not need to remove or modify any existing properties on the response.
page
the current page of resultstotalPages
total number of pages based on results per pageWhen the skip
parameter is provided to a paginated endpoint, the page
param will be ignored. Otherwise, the value of skip
will calculated from page
and limit
(results per page). This way the current pagination API will still be supported.
const skip = skipParam || (page - 1) * limit
There is no feature to search authors by their names, something like this.
https://quotable.io/authors?searchKeyword=einstein
If we hit the same endpoint with slug param it returns 0 (zero) results.
https://api.quotable.io/authors?slug=einstein
It would be very useful ๐
I'll be great if there is an API to get a quote by its ID.
The suggested API:
https://api.quotable.io/quotes/:id
{
_id: string,
content: string,
author: string
}
The install dependency command says
npm run install
While it should be
npm install
Luke,
Sorry for not getting back to you before you closed issue 10. Things have been a little crazy over the holidays. I feel like quotable worked when you first linked the codepen and code sandbox, but after several more attempts it is not working for me over the past couple of days.
I tried FF Dev, Chrome and Safari browsers.
[Error] Error while parsing the 'sandbox' attribute: 'allow-presentation' is an invalid sandbox flag. (RwNVeQG, line 851)
[Error] Failed to load resource: A server with the specified hostname could not be found. (random, line 0)
[Error] Unhandled Promise Rejection: TypeError: A server with the specified hostname could not be found.
(anonymous function) (RwNVeQG:66)
asyncFunctionResume
(anonymous function)
promiseReactionJob
Here are some screenshots of the errors from Safari/codepen.
https://res.cloudinary.com/jastuccio/image/upload/v1577771339/quotable%20github%20errors/Screen_Shot_2019-12-31_at_00.24.40.png
I found this in a search about the sandbox error:
http://stackoverflow.com/a/33542435:
This error can be safely ignored, the script will continue to run fine. These are two new flags which have been implemented in Chrome 46 (the current stable release). If you're testing in a browser that doesn't support them, you'll see that error (which is really just a warning).
The allow-modals flag is required because Chrome will, by default, block modal dialogs within a sandboxed iframe. Adding this flag allows modals to work in your apps scripts
.
I am working on a project that requires a English quotes in Urdu(ur) language. Can you please ๐ฅบ add this language, if you can I will be very happy ๐
An API method to search quotes. It should allow people to search for quotes by content
, author
, and possibly tags
. Ideally, search results should be sorted by relevance.
GET /search/quotes
Query Params
param | type | Description |
---|---|---|
query | String |
The string to search for |
limit | Int |
The number of authors to return per request. (for pagination) |
skip | Int |
The number of items to skip (for pagination) |
1. Search for a specific quote or phrase
Ideally, this should work even if the query does not exactly match the quote
GET /search/quotes/?query=a divided house wont stand
GET /search/quotes/?query=divided house
Should both return the following quote
"A house divided against itself will not stand"
2. Search for quotes containing a keyword
GET /search/quotes/?query=love
Should return all quotes containing the word "love"
3. Search for quotes by author name
GET /search/quotes/?query=Lincoln
A lot of the authors in the quotes have bios that would be interesting to read, especially those on, say, Wikipedia. My feature request is to add these somehow (I guess in the Authors collection, if not into the quotes themselves (de-normalised, effectively, for ease of consumption).
Would you consider adding a "link" field (and possible even a photo url field) to the authors collection? I'd be happy with both pieces of work (A: adding the fields, and B: populating some of the authors themselves) if you'd like? Similar to my other request, I'd of course need access to the backend for 'B'.
Hi can you please add two lines poetry in database.. I didn't find two lines short poetry api on internet.. I am working on project that require Short poetry
.
Api is again down please fix....
Hi, I discovered Quota today and it helped me with my project :)
But I found one typo in README.md. Under "usage", you have:
jQuery Example
$.getJSON('https://quota.glitch.me/random'), function(data) {
console.log(`${data.quoteText} -${data.quoteAuthor}`)
}
There is one extra right parenthesis after 'https://quota.glitch.me/random'
It should be: $.getJSON('https://quota.glitch.me/random', function(data) {...
I am getting an application error only when i request quotes based on tags, this used to work well yesterday and if im not wrong i think it worked in the morning (around 9am ist) too.
To Reproduce
I tried to fetch some data from my webapp, but the request failed, well it's just the https certificate.
Thnks c:
Error:
"Mixed Content: The page at 'https://typing-applg.netlify.app/#/' was loaded over HTTPS, but requested an insecure resource 'http://staging.quotable.io/quotes?maxLength=200&minLength=100&limit=10'. This request has been blocked; the content must be served over HTTPS."
It would be helpful if other then English you can get quotes in other languages based on request.
The method /authors/:id
does not return the correct response.
GET https://api.quotable.io/authors/N5lVXx7ZOkGV
According to the documentation, the response should be an object with the following fields.
{
_id: string
name: string
quoteCount: number
quotes: Array<{
_id: string
content: string
author: string
length: number
tags: string[]
}>
}
The items in the quotes
array do not have the correct properties
{
"_id": "N5lVXx7ZOkGV",
"name": "Alexander Chalmers",
"quoteCount": 1,
"quotes": [
{
"_id": "zTK-zsh2HysH",
"__v": 0
}
]
}
API Client: Postman
Now api working but very slow some time working or some time not working...
This update will look to add another feature in feature-rich Quote API.
It would be amazing to have the author's image along with the quote and bio.
Check the current status of the API servers. Does this show that the servers are down for everyone?
yes or no
Provide any additional information that might be helpful
The method /quotes/:id
does not return the expected response.
https://api.quotable.io/quotes/HxaMW05ghs7P
The response should be an object with the following fields
content: string
author: string
length: number
tags: string[]
Response does not include fields tags
or length
NA
I am wondering when the server will be back ? Thanks
There are a considerable amount of typos in the quotes.
I'm currently building a typing game that's powered by this API.
But there is one issue: Sometimes the API generates a Quote with a special apostrophe that requires an alt code to write.
Currently, I do have an in-code fix, but would be nice to have a GET request with this feature.
I'm just considering to extend API with a new feature - selecting quotes by a tag name. But firstly each quote object has to contain tag or tags property in it. I'm not sure how hard is to add tag/tags to each quote since my English is not my native language. What do you think?
1. Update documentation for tags endpoint
README#get-tags should include a section with the following query parameters
param: sortBy
type: enum: ["name", "quoteCount"]
description: The field used to sort tags. Default is name.
param: sortOrder
type: enum: ["asc", "desc"]
description: The order in which results are sorted. Default order depends on the sortBy field.
2. Add the tags endpoint to the table of contents
First of all, thanks so much for this project, I'm using inside a personal project of my own and love seeing the quotes!
There are, unfortunately, a whole bunch of spelling and grammar errors in a lot of the quotes. I'd love to help with these, but they're not part of the project itself, as far as I can see. Is there a way I could get access to the data store to help, if you'd like me to pitch in?
Sir api is down please fix it....
I'm using react axios to call this api, here is the code
import React, { useState, useEffect } from 'react'
import axios from "axios"
export default function Quote() {
const [quote, setQuote] = useState("");
const [author, setAuthor] = useState("")
const quoteAPI = async () => {
let arrayOfQuotes = [];
try{
const data = await axios.get("http://api.quotable.io/random")
arrayOfQuotes = data.data;
} catch(error){
console.log(error)
}
try{
setQuote(arrayOfQuotes.content)
setAuthor(arrayOfQuotes.author)
} catch(error){
console.log(error)
}
}
useEffect(() => {
quoteAPI();
}, [])
return (
<div className="quotes">
<div className="word">
{quote}
</div>
<div className="author">
{author}
</div>
<div class="d-flex justify-content-center">
<a class="btn btn-secondary btn-xl text-center " onClick={quoteAPI}><i class="fas fa-redo-alt"></i></a>
</div>
</div>
)
}
it ran perfectly when i ran it locally, but when i deployed it to vercel and visited the site, the quote wasn't showing, any clue?
I thought it would be pretty cool to use an API from another FCCer! I was having trouble with the script and pointed my browser to several quotable.io domains. They did not load. Maybe this API got hammered with huge bandwidth?
@lukePeavey would be very handy if we could have the link
(eventually the bio
) on the /quotes
endpoint
I'm a new contributor. It'll be really great if a brief contributing guide exists in this project. Having a CONTRIBUTING.md file or something else with the contributing instructions.
So far I found that I need to do following steps before doing any changes in the codebase.
seeding database with
MONGODB_URI=mongodb://localhost:27017/quotable npm run database:seed data/sample
starting tests
MONGODB_URI=mongodb://localhost:27017/quotable npm test
starting the app
MONGODB_URI=mongodb://localhost:27017/quotable npm run start
I can't access either the official api or the branch.
Describe the bug
Documentation states that to get quotes by author, user needs to hit API endpoint /quotes?author=albert-einstein although this does not work, should be updated to use authorSlug instead of author in the payload because that works. See attached snapshot.
To Reproduce
staging.quotable.io/quotes?author=abraham-lincoln
GET staging.quotable.io/quotes?author=abraham-lincoln
Expected Response
User should either get results by author
or the document should be updated to get results by authorSlug
Check Snapshot for the following API
staging.quotable.io/quotes?authorSlug=abraham-lincoln
Describe the bug
Quotable DNS domain seems to not have any records, causing all API requests to fail.
To Reproduce
See https://www.nslookup.io/dns-records/quotable.io#authoritative
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.