Module: Stands4

Includes:
HTTParty
Defined in:
lib/Stands4.rb,
lib/Stands4/version.rb

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.abbr(term) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/Stands4.rb', line 13

def self.abbr(term)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:term => term }
	}
	results = get('/services/v2/abbr.php', options)
end

.configure(uid, tokenid) ⇒ Object



8
9
10
11
# File 'lib/Stands4.rb', line 8

def self.configure(uid, tokenid)
	@@uid = uid
	@@tokenid = tokenid
end

.conv(expression) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/Stands4.rb', line 45

def self.conv(expression)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:expression => expression }
	}
	results = get('/services/v2/conv.php', options)
end

.defs(word) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/Stands4.rb', line 29

def self.defs(word)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:word => word }
	}
	results = get('/services/v2/defs.php', options)
end

.phrases(phrase) ⇒ Object



61
62
63
64
65
66
67
# File 'lib/Stands4.rb', line 61

def self.phrases(phrase)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:phrase => phrase }
	}
	results = get('/services/v2/phrases.php', options)
end

.quotes(searchtype = 'RANDOM', query = '') ⇒ Object



69
70
71
72
73
74
75
# File 'lib/Stands4.rb', line 69

def self.quotes(searchtype='RANDOM', query='')
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:searchtype => searchtype, :query => query, }
	}
	results = get('/services/v2/quotes.php', options)
end

.rhymes(term) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/Stands4.rb', line 37

def self.rhymes(term)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:term => term }
	}
	results = get('/services/v2/rhymes.php', options)
end

.syno(word) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/Stands4.rb', line 53

def self.syno(word)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:word => word }
	}
	results = get('/services/v2/syno.php', options)
end

.zip(zip) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/Stands4.rb', line 21

def self.zip(zip)
	options = {
		:query => { :uid => @@uid, :tokenid => @@tokenid,
								:zip => zip }
	}
	results = get('/services/v2/zip.php', options)
end