-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmashape-config.xml
114 lines (114 loc) · 7.37 KB
/
mashape-config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<api xmlns="http://mashape.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mashape.com http://www.mashape.com/schema/mashape-4.0.xsd">
<endpoint name="Get trivia fact" group="" http="GET">
<route>/{number}/trivia</route>
<description>Get a trivia fact about a number</description>
<parameters>
<parameter type="string" optional="false" name="number">
<description>The integer of interest</description>
<example>42</example>
</parameter>
<parameter type="string" optional="true" name="fragment">
<description>Add "?fragment=true" to return the fact as a sentence fragment that can be easily included as part of a larger sentence. This means that the first word is lowercase and ending punctuation is omitted. For trivia and math, a noun phrase is returned that can be used in a sentence like “We now have more users than [fact as fragment]!”.</description>
<example>true</example>
</parameter>
<parameter type="string" optional="true" name="notfound">
<description>Specifies what to return if the number is not found. Value can be "default" (to return a canned message), "floor" (to round down to the largest number that does have an associated fact, and return that fact), or "ceil" (which is like floor but rounds up to the smallest number that has an associated fact).</description>
<example>floor</example>
</parameter>
<parameter type="string" optional="true" name="json">
<description>Specify "true" to return result as JSON instead of plaintext.</description>
<example>true</example>
</parameter>
</parameters>
<response type="string"/>
</endpoint>
<endpoint name="Get math fact" group="" http="GET">
<route>/{number}/math</route>
<description>Get a mathematical property about a number</description>
<parameters>
<parameter type="string" optional="false" name="number">
<description>The integer of interest</description>
<example>1729</example>
</parameter>
<parameter type="string" optional="true" name="fragment">
<description>Add "?fragment=true" to return the fact as a sentence fragment that can be easily included as part of a larger sentence. This means that the first word is lowercase and ending punctuation is omitted. For trivia and math, a noun phrase is returned that can be used in a sentence like “We now have more users than [fact as fragment]!”.</description>
<example>true</example>
</parameter>
<parameter type="string" optional="true" name="json">
<description>Specify "true" to return result as JSON instead of plaintext.</description>
<example>true</example>
</parameter>
</parameters>
<response type="string"/>
</endpoint>
<endpoint name="Get year fact" group="" http="GET">
<route>/{year}/year</route>
<description>Get a fact about a year</description>
<parameters>
<parameter type="string" optional="false" name="year">
<description>The year of interest</description>
<example>1492</example>
</parameter>
<parameter type="string" optional="true" name="fragment">
<description>Add "?fragment=true" to return the fact as a sentence fragment that can be easily included as part of a larger sentence. This means that the first word is lowercase and ending punctuation is omitted. For trivia and math, a noun phrase is returned that can be used in a sentence like “We now have more users than [fact as fragment]!”.</description>
<example>true</example>
</parameter>
<parameter type="string" optional="true" name="json">
<description>Specify "true" to return result as JSON instead of plaintext.</description>
<example>true</example>
</parameter>
</parameters>
<response type="string"/>
</endpoint>
<endpoint name="Get date fact" group="" http="GET">
<route>/{month}/{day}/date</route>
<description>Get a fact about a day of year</description>
<parameters>
<parameter type="string" optional="false" name="month">
<description>The 1-indexed month (eg. 6 for June)</description>
<example>6</example>
</parameter>
<parameter type="string" optional="false" name="day">
<description>The day of the month</description>
<example>21</example>
</parameter>
<parameter type="string" optional="true" name="fragment">
<description>Add "?fragment=true" to return the fact as a sentence fragment that can be easily included as part of a larger sentence. This means that the first word is lowercase and ending punctuation is omitted. For trivia and math, a noun phrase is returned that can be used in a sentence like “We now have more users than [fact as fragment]!”.</description>
<example>true</example>
</parameter>
<parameter type="string" optional="true" name="json">
<description>Specify "true" to return result as JSON instead of plaintext.</description>
<example>true</example>
</parameter>
</parameters>
<response type="string"/>
</endpoint>
<endpoint name="Get random fact" group="" http="GET">
<route>/random/{type}</route>
<description>Get result by random number</description>
<parameters>
<parameter type="string" optional="false" name="type">
<description>One of "trivia", "math", "date", or "year"</description>
<example>trivia</example>
</parameter>
<parameter type="string" optional="true" name="min">
<description>Minimum number, inclusive</description>
<example>10</example>
</parameter>
<parameter type="string" optional="true" name="max">
<description>Maximium number, inclusive</description>
<example>20</example>
</parameter>
<parameter type="string" optional="true" name="fragment">
<description>Add "?fragment=true" to return the fact as a sentence fragment that can be easily included as part of a larger sentence. This means that the first word is lowercase and ending punctuation is omitted. For trivia and math, a noun phrase is returned that can be used in a sentence like “We now have more users than [fact as fragment]!”.</description>
<example>true</example>
</parameter>
<parameter type="string" optional="true" name="json">
<description>Specify "true" to return result as JSON instead of plaintext.</description>
<example>true</example>
</parameter>
</parameters>
<response type="string"/>
</endpoint>
</api>