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.
Files changed (2) hide show
  1. data/lib/pcr-ruby.rb +14 -2
  2. metadata +1 -1
@@ -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 = File.open(File.join(File.dirname(__FILE__), '..', 'token.dat', &:readline)
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pcr-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: