Class: HackerRank::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/hackerrank/base.rb
Constant Summary
collapse
- BASE_URI =
"https://www.hackerrank.com/x/api/v2"
Class Method Summary
collapse
Class Method Details
.all(params = {}) ⇒ Object
11
12
13
|
# File 'lib/hackerrank/base.rb', line 11
def self.all(params = {})
request :get, "", params
end
|
.collection_path(collection_path) ⇒ Object
7
8
9
|
# File 'lib/hackerrank/base.rb', line 7
def self.collection_path(collection_path)
@collection_path = collection_path
end
|
.create(params) ⇒ Object
19
20
21
|
# File 'lib/hackerrank/base.rb', line 19
def self.create(params)
request :post, "", params
end
|
.delete(id, params = {}) ⇒ Object
27
28
29
|
# File 'lib/hackerrank/base.rb', line 27
def self.delete(id, params = {})
request :delete, "/#{id}", params
end
|
.find(id, params = {}) ⇒ Object
15
16
17
|
# File 'lib/hackerrank/base.rb', line 15
def self.find(id, params = {})
request :get, "/#{id}", params
end
|
.update(id, params) ⇒ Object
23
24
25
|
# File 'lib/hackerrank/base.rb', line 23
def self.update(id, params)
request :put, "/#{id}", params
end
|