We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4edc118 commit 2886556Copy full SHA for 2886556
pkg/root.go
@@ -1,4 +1,4 @@
1
-// Exports Quotable Struct and FetchQuotabler Method
+// Package quotable exports Quotable Struct and FetchQuotabler Method
2
package quotable
3
4
import "encoding/json"
@@ -15,6 +15,7 @@ type Quotable struct {
15
DateModified string `json:"dateModified"`
16
}
17
18
+// Fetches the Quotable API.
19
func GetQuotableObject() Quotable {
20
var data string = parseHttpResponse(fetch("https://api.quotable.io/random"))
21
@@ -24,6 +25,7 @@ func GetQuotableObject() Quotable {
24
25
return parsedData
26
27
28
+// Return a random quote and author.
29
func GetRandomQuoteAndAuthor() (string, string) {
30
quotableFetch := GetQuotableObject()
31
return quotableFetch.Content, quotableFetch.Author
0 commit comments