engrade 1.0.0 → 1.0.1
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/README.md +30 -10
- data/engrade.gemspec +1 -1
- data/lib/engrade.rb +2 -2
- data/lib/engrade/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -1,25 +1,41 @@
|
|
1
|
-
#
|
1
|
+
# engrade
|
2
2
|
|
3
|
-
|
3
|
+
Ruby wrapper for the Engrade API
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
```
|
8
|
+
gem install 'engrade'
|
9
|
+
```
|
8
10
|
|
9
|
-
|
11
|
+
## Usage
|
10
12
|
|
11
|
-
|
13
|
+
```ruby
|
14
|
+
require 'engrade'
|
12
15
|
|
13
|
-
|
16
|
+
# Getting started
|
14
17
|
|
15
|
-
|
18
|
+
Engrade.set_apikey('123456789')
|
19
|
+
Engrade.login('username', 'password')
|
16
20
|
|
17
|
-
|
21
|
+
# Grabbing classes
|
18
22
|
|
19
|
-
|
23
|
+
classes = Engrade.classes
|
24
|
+
classes = Engrade.classes("Sem1")
|
25
|
+
|
26
|
+
# Getting assignments from classes
|
27
|
+
|
28
|
+
assignments = Engrade.assignments(classes)
|
20
29
|
|
21
|
-
|
30
|
+
# Deleting assignments
|
22
31
|
|
32
|
+
Engrade.delete(assignments)
|
33
|
+
|
34
|
+
# Posting directly to Engrade
|
35
|
+
# (make sure to set apikey and login first)
|
36
|
+
|
37
|
+
Engrade.post(:apitask => 'assignment', :clid => '101', :assnid => '1')
|
38
|
+
```
|
23
39
|
## Contributing
|
24
40
|
|
25
41
|
1. Fork it
|
@@ -27,3 +43,7 @@ TODO: Write usage instructions here
|
|
27
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
44
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
45
|
5. Create new Pull Request
|
46
|
+
|
47
|
+
## Contact
|
48
|
+
Comments? Concerns? Want additional features?
|
49
|
+
Contact me by email at zgthompson@gmail.com.
|
data/engrade.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["zgthompson@gmail.com"]
|
11
11
|
gem.description = %q{Basic ruby wrapper for the Engrade API}
|
12
12
|
gem.summary = %q{Utilize the Engrade API easily through Ruby}
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "https://github.com/zgthompson/engrade"
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/engrade.rb
CHANGED
@@ -10,7 +10,7 @@ module Engrade
|
|
10
10
|
###########################
|
11
11
|
# VARIABLES AND CONSTANTS #
|
12
12
|
###########################
|
13
|
-
|
13
|
+
|
14
14
|
@default_params = { :api => 'json' }
|
15
15
|
@browser = Engrade::Browser.new
|
16
16
|
|
@@ -42,7 +42,7 @@ module Engrade
|
|
42
42
|
# CORE FUNCTIONALITY #
|
43
43
|
######################
|
44
44
|
|
45
|
-
# .post
|
45
|
+
# .post merges the default_params with query, a hash of input fields,
|
46
46
|
# and posts them to the api
|
47
47
|
# Example:
|
48
48
|
# Engrade.post({:apitask => 'login', :usr => 'myusername', :pwd => 'secret'})
|
data/lib/engrade/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engrade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -198,7 +198,7 @@ files:
|
|
198
198
|
- spec/factories/response_factory.rb
|
199
199
|
- spec/integration_spec.rb
|
200
200
|
- spec/spec_helper.rb
|
201
|
-
homepage:
|
201
|
+
homepage: https://github.com/zgthompson/engrade
|
202
202
|
licenses: []
|
203
203
|
post_install_message:
|
204
204
|
rdoc_options: []
|
@@ -212,7 +212,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
212
|
version: '0'
|
213
213
|
segments:
|
214
214
|
- 0
|
215
|
-
hash: -
|
215
|
+
hash: -562363953
|
216
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
217
|
none: false
|
218
218
|
requirements:
|
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
segments:
|
223
223
|
- 0
|
224
|
-
hash: -
|
224
|
+
hash: -562363953
|
225
225
|
requirements: []
|
226
226
|
rubyforge_project:
|
227
227
|
rubygems_version: 1.8.25
|