Documentation
¶
Index ¶
- Constants
- Variables
- func CompareSlice(a, b []string) bool
- func CopyMap(source map[string]string) map[string]string
- func HelpAddURL(s string) string
- func Isin(list []string, s string) bool
- func RequestWikiApi(args map[string]string) (models.RequestResult, error)
- func TurnSliceOfString(s []interface{}) []string
- func UpdateLastCall(now time.Time)
- func UpdateMap(a map[string]string, b map[string]interface{})
Constants ¶
View Source
const ( ReqPerSec = 199 ApiGap = time.Second / ReqPerSec )
Variables ¶
View Source
var ( UserAgent string = "go-wiki" WikiLanguage string = "en" WikiURL string = "http://%v.wikipedia.org/w/api.php" LastCall time.Time = time.Now() Cache cache.WikiCache = cache.MakeWikiCache() WikiRequester = RequestWikiApi )
Functions ¶
func HelpAddURL ¶
func RequestWikiApi ¶
func RequestWikiApi(args map[string]string) (models.RequestResult, error)
Make a request to the Wikipedia API using the given search parameters.
Returns a RequestResult (You can see the model in the models.go file)
func TurnSliceOfString ¶
func TurnSliceOfString(s []interface{}) []string
func UpdateLastCall ¶
Update the last time we call the API (API should)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.