@@ -23,6 +23,202 @@ Returns statistics about all the available quotes.
2323curl https://fullStackbulletin.github.io/tech-quotes/quotes/stats.json | jq .
2424```
2525
26+ Returns
2627
28+ ``` json
29+ {
30+ "total" : 53 ,
31+ "all" : " https://fullStackbulletin.github.io/tech-quotes/quotes/all.json" ,
32+ "first" : " https://fullStackbulletin.github.io/tech-quotes/quotes/0.json" ,
33+ "last" : " https://fullStackbulletin.github.io/tech-quotes/quotes/52.json" ,
34+ "urlPrefix" : " https://fullStackbulletin.github.io/tech-quotes/quotes"
35+ }
36+ ```
37+
38+ ### ` /quotes/all.json `
39+
40+ Returns all the quotes
41+
42+ #### Example
43+
44+ ``` bash
45+ curl https://fullStackbulletin.github.io/tech-quotes/quotes/all.json | jq .
46+ ```
47+
48+ Returns
49+
50+ ``` json
51+ {
52+ "metadata" : {
53+ "total" : 53 ,
54+ "first" : 0 ,
55+ "last" : 52
56+ },
57+ "quotes" : [
58+ {
59+ "id" : 0 ,
60+ "text" : " Technology is anything that wasn't around when you were born" ,
61+ "author" : {
62+ "id" : " alan-kay" ,
63+ "name" : " Alan Kay" ,
64+ "description" : " Computer Scientist" ,
65+ "wiki" : " https://en.wikipedia.org/wiki/Alan_Kay" ,
66+ "url" : " https://fullStackbulletin.github.io/tech-quotes/authors/alan-kay.json"
67+ },
68+ "url" : " https://fullStackbulletin.github.io/tech-quotes/quotes/0.json"
69+ },
70+ {
71+ "id" : 1 ,
72+ "text" : " Any sufficiently advanced technology is equivalent to magic" ,
73+ "author" : {
74+ "id" : " arthur-c-clarke" ,
75+ "name" : " Arthur C. Clarke" ,
76+ "description" : " Author" ,
77+ "wiki" : " https://en.wikipedia.org/wiki/Arthur_C._Clarke" ,
78+ "url" : " https://fullStackbulletin.github.io/tech-quotes/authors/arthur-c-clarke.json"
79+ },
80+ "url" : " https://fullStackbulletin.github.io/tech-quotes/quotes/1.json"
81+ },
82+ {
83+ "//" : " ..." ,
84+ }
85+ ]
86+ }
87+ ```
88+
89+ ### ` /quotes/{quoteId}.json `
90+
91+ Gets a single quote by ID:
92+
93+ #### Example
94+
95+ ``` bash
96+ curl https://fullStackbulletin.github.io/tech-quotes/quotes/17.json | jq .
97+ ```
98+
99+ Returns
100+
101+ ``` json
102+ {
103+ "id" : 17 ,
104+ "text" : " The art challenges the technology, and the technology inspires the art" ,
105+ "author" : {
106+ "id" : " john-lasseter" ,
107+ "name" : " John Lasseter" ,
108+ "description" : " Director" ,
109+ "wiki" : " https://en.wikipedia.org/wiki/John_Lasseter" ,
110+ "url" : " https://fullStackbulletin.github.io/tech-quotes/authors/john-lasseter.json"
111+ },
112+ "url" : " https://fullStackbulletin.github.io/tech-quotes/quotes/17.json"
113+ }
114+ ```
115+
116+
117+ ### ` /authors/stats.json `
118+
119+ Gets statistics abouts the authors
120+
121+ #### Example
122+
123+ ``` bash
124+ curl https://fullStackbulletin.github.io/tech-quotes/authors/stats.json | jq .
125+ ```
126+
127+ Returns
128+
129+ ``` json
130+ {
131+ "total" : 51 ,
132+ "all" : " https://fullStackbulletin.github.io/tech-quotes/authors/all.json" ,
133+ "urlPrefix" : " https://fullStackbulletin.github.io/tech-quotes/authors"
134+ }
135+ ```
136+
137+ ### ` /authors/all.json `
138+
139+ Gets the list of all available authors
140+
141+ #### Example
142+
143+ ``` bash
144+ curl https://fullStackbulletin.github.io/tech-quotes/authors/all.json | jq .
145+ ```
146+
147+ Returns
148+
149+ ``` json
150+ {
151+ "metadata" : {
152+ "total" : 51
153+ },
154+ "authors" : [
155+ " alan-kay" ,
156+ " arthur-c-clarke" ,
157+ " mark-kennedy" ,
158+ " thomas-edison" ,
159+ " albert-einstein" ,
160+ " elbert-hubbard" ,
161+ " douglas-adams" ,
162+ " ..." ,
163+ " john-brunner"
164+ ]
165+ }
166+ ```
167+
168+ ### ` /authors/{authorId}.json `
169+
170+ Gets the details and the quote of a given author
171+
172+ #### Example
173+
174+ ``` bash
175+ curl https://fullStackbulletin.github.io/tech-quotes/authors/andrew-s-tanenbaum.json | jq .
176+ ```
177+
178+ Returns
179+
180+ ``` json
181+ {
182+ "id" : " andrew-s-tanenbaum" ,
183+ "name" : " Andrew S. Tanenbaum" ,
184+ "description" : " Computer Scientist" ,
185+ "wiki" : " https://en.wikipedia.org/wiki/Andrew_S._Tanenbaum" ,
186+ "url" : " https://fullStackbulletin.github.io/tech-quotes/authors/andrew-s-tanenbaum.json" ,
187+ "quotes" : [
188+ {
189+ "id" : 31 ,
190+ "text" : " Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway" ,
191+ "author" : {
192+ "id" : " andrew-s-tanenbaum" ,
193+ "name" : " Andrew S. Tanenbaum" ,
194+ "description" : " Computer Scientist" ,
195+ "wiki" : " https://en.wikipedia.org/wiki/Andrew_S._Tanenbaum" ,
196+ "url" : " https://fullStackbulletin.github.io/tech-quotes/authors/andrew-s-tanenbaum.json"
197+ },
198+ "url" : " https://fullStackbulletin.github.io/tech-quotes/quotes/31.json"
199+ }
200+ ]
201+ }
202+ ```
203+
204+ ## Suggest a quote
205+
206+ If you want to suggest a new tech quote here's how you can do that.
207+
208+ - [ Fork this repository] ( https://github.com/FullStackBulletin/tech-quotes/fork )
209+ - Edit the file [ ` src/quotes.ts ` ] ( /src/quotes.ts ) and append the new fact at the bottom (make sure to follow the spec provided by the specific TypeScript types).
210+ - Run ` npm run test && npm run build `
211+ - If all looks good, commit your changes
212+ - Open a PR against the original repository
213+
214+
215+ ## Contributing
216+
217+ Everyone is very welcome to contribute to this project.
218+ You can contribute just by submitting bugs or suggesting improvements by
219+ [ opening an issue on GitHub] ( https://github.com/FullStackBulletin/tech-quotes/issues ) .
220+
221+
222+ ## License
27223
28- WIP
224+ Licensed under [ MIT License ] ( LICENSE ) . © Luciano Mammino.
0 commit comments