Dictum
API to get access to the collection of the most inspiring expressions of mankind
Table of Contents
Dictum API
Authors
Search authors
GET https://api.fisenko.net/v1/authors/[language]?query=[query]&offset=[offset]&limit=[limit]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
query |
string |
optional a search query. |
offset |
int |
optional an offset. By default is 0 . |
limit |
int |
optional a maximum number of items in the response. By default is 50 . Could not be greater than 50 |
Example
request
GET https://api.fisenko.net/v1/authors/en?query="Steve Jobs"&limit=50&offset=0
returns
[
{
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
]
Get an author by ID
GET https://api.fisenko.net/v1/authors/[language]/[id]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
id |
string |
required an author ID. |
Example
request
GET https://api.fisenko.net/v1/authors/en/6153b7d49e8e5ae3eb230a5b
returns
{
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
Search an author's quotes
GET https://api.fisenko.net/v1/authors/[language]/[id]/quotes?query=[query]&offset=[offset]&limit=[limit]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
id |
string |
required an author ID. |
query |
string |
optional a search query. |
offset |
int |
optional an offset. By default is 0 . |
limit |
int |
optional a maximum number of items in the response. By default is 50 . Could not be greater than 50 |
Example
request
GET https://api.fisenko.net/v1/authors/en/6153b7d49e8e5ae3eb230a5b/quotes?query=&limit=1&offset=0
returns
[
{
"id": "6153bbb29e8e5ae3eb2399d0",
"text": "Be a yardstick of quality. Some people arent used to an environment where excellence is expected.",
"author": {
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
}
]
Quotes
Get Random Quote
GET https://api.fisenko.net/v1/quotes/[language]/random
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
Example
request
GET https://api.fisenko.net/v1/quotes/en/random
returns
[
{
"id": "6153bbe19e8e5ae3eb2c85aa",
"text": "Stay hungry, stay foolish.",
"author": {
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
}
]
Search quotes
GET https://api.fisenko.net/v1/quotes/[language]?query=[query]&offset=[offset]&limit=[limit]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
query |
string |
optional a search query. |
offset |
int |
optional an offset. By default is 0 . |
limit |
int |
optional a maximum number of items in the response. By default is 50 . Could not be greater than 50 |
Example
request
GET https://api.fisenko.net/v1/quotes/en?query="Stay hungry"&limit=5&offset=0
returns
[
{
"id": "6153bbe59e8e5ae3eb2d2cc1",
"text": "Artists are supposed to stay hungry.",
"author": {
"id": "6153b7d69e8e5ae3eb234901",
"name": "Michael Connelly"
}
},
{
"id": "6153bbe19e8e5ae3eb2c85aa",
"text": "Stay hungry, stay foolish.",
"author": {
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
}
]
Get a quote by ID
GET https://api.fisenko.net/v1/quotes/[language]/[id]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
id |
string |
required a quote ID. |
Example
request
GET https://api.fisenko.net/v1/quotes/en/6153bbe19e8e5ae3eb2c85aa
returns
{
"id": "6153bbe19e8e5ae3eb2c85aa",
"text": "Stay hungry, stay foolish.",
"author": {
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
}
Create a quote
POST https://api.fisenko.net/v1/quotes/[language]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
Payload
Parameter | Type | Description |
---|---|---|
authorId |
string |
required Id of the author's quote. |
text |
string |
required a quote text. |
Example
request
POST https://api.fisenko.net/v1/quotes/en
BODY
{
"authorId": "6153b7d49e8e5ae3eb230a5b",
"text": "Stay hungry, stay foolish."
}
returns
{
"id": "6153bbe19e8e5ae3eb2c85aa",
"text": "Stay hungry, stay foolish.",
"author": {
"id": "6153b7d49e8e5ae3eb230a5b",
"name": "Steve Jobs"
}
}
Like a quote
PUT https://api.fisenko.net/v1/quotes/[language]/[id]/like
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
id |
string |
required a quote ID. |
Example
request
PUT https://api.fisenko.net/v1/quotes/en/6153bbb59e8e5ae3eb2450a3
returns HTTP 200
if the request was successfully executed
Languages
Get languages
GET https://api.fisenko.net/v1/languages
Example
request
GET https://api.fisenko.net/v1/languages
returns
[
{
"code": "RU",
"language": "Русский"
},
{
"code": "en",
"language": "English"
}
]
Statistics
Get statistics
GET https://api.fisenko.net/v1/statistics/[language]
Parameters
Parameter | Type | Description |
---|---|---|
language |
string |
required language, e.g. en , ru . |
Example
request
GET https://api.fisenko.net/v1/statistics/en
returns
{
"authors": 30752,
"quotes": 911533
}
Links
License
MIT
Supporters
JetBrains is supporting this open source project with: