pcr-ruby 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/pcr-ruby.rb +14 -2
- metadata +1 -1
data/lib/pcr-ruby.rb
CHANGED
@@ -96,10 +96,22 @@ module PCR
|
|
96
96
|
#API class handles token and api url, so both are easily changed
|
97
97
|
class API
|
98
98
|
attr_accessor :token, :api_endpt
|
99
|
-
def initialize()
|
100
|
-
@token =
|
99
|
+
def initialize(token)
|
100
|
+
@token = token
|
101
101
|
@api_endpt = "http://api.penncoursereview.com/v1/"
|
102
102
|
end
|
103
|
+
|
104
|
+
def course(args)
|
105
|
+
Course.new(args)
|
106
|
+
end
|
107
|
+
|
108
|
+
def section(args)
|
109
|
+
Section.new(args)
|
110
|
+
end
|
111
|
+
|
112
|
+
def instructor(id, args)
|
113
|
+
Instructor.new(id, args)
|
114
|
+
end
|
103
115
|
end
|
104
116
|
|
105
117
|
#These errors serve as more specific exceptions so we know where exactly errors are coming from.
|