KerbalStuff 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -9
- data/lib/kerbalstuff/mod.rb +2 -1
- data/lib/kerbalstuff/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -33,25 +33,23 @@ require 'kerbalstuff' # Require the Gem
|
|
33
33
|
```ruby
|
34
34
|
ks = KerbalStuff # Initialize the wrapper
|
35
35
|
|
36
|
-
ks.search_mod(string) #
|
37
|
-
ks.search_user(string)
|
36
|
+
ks.search_mod(string) # returns an array containing Mod objects.
|
37
|
+
ks.search_user(string) # returns an array containing User objects.
|
38
38
|
|
39
|
-
ks.
|
40
|
-
ks.
|
39
|
+
ks.get_mod(integer) # returns a Mod object containing the information about the mod.
|
40
|
+
ks.get_user(string) # returns a User object containing the information about the user.
|
41
41
|
|
42
|
-
ks.
|
42
|
+
ks.get_latest_mod_version(integer) # retuns a ModVersion object containing information about the version.
|
43
43
|
|
44
|
-
ks.get_basic_mod_info(integer) # will return a hash containing basic information about the mod - name, author, downloads, url, latest version
|
45
|
-
ks.get_basic_user_info(integer) # will return a hash containing basic information about the user - name, mods, irc nick, forum nick.
|
46
44
|
```
|
47
45
|
|
48
46
|
## Documentation
|
49
|
-
For a *slightly* more detailed version of the gem's methods, take a look [here](http://rubydoc.info/gems/KerbalStuff/
|
47
|
+
For a *slightly* more detailed version of the gem's methods, take a look [here](http://rubydoc.info/gems/KerbalStuff/).
|
50
48
|
|
51
49
|
|
52
50
|
## License
|
53
51
|
|
54
|
-
licensed under MIT License Copyright (c)
|
52
|
+
licensed under MIT License Copyright (c) 2014 Alexandre Oliveira. See LICENSE for further details.
|
55
53
|
|
56
54
|
|
57
55
|
## Contributing
|
data/lib/kerbalstuff/mod.rb
CHANGED
@@ -16,6 +16,7 @@ module KerbalStuff
|
|
16
16
|
@followers = @json['followers']
|
17
17
|
@default_version_id = @json['default_version_id']
|
18
18
|
@description = @json['description']
|
19
|
+
@license = @json['license']
|
19
20
|
|
20
21
|
if @json.has_key?('versions')
|
21
22
|
@versions = []
|
@@ -29,7 +30,7 @@ module KerbalStuff
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def to_s
|
32
|
-
"Mod:\nname=#{@name}\nbackground=#{@background}\nauthor=#{@author}\ndownloads=#{@downloads}\nid=#{@id}\nshort_description=\"#{@short_description}\"\nversions=#{@versions}\ndescription_html=\"#{@description_html}\"\nfollowers=#{@followers}\ndefault_version_id=#{@default_version_id}\ndescription=\"#{@description}\"\n"
|
33
|
+
"Mod:\nname=#{@name}\nbackground=#{@background}\nlicense=#{@license}\nauthor=#{@author}\ndownloads=#{@downloads}\nid=#{@id}\nshort_description=\"#{@short_description}\"\nversions=#{@versions}\ndescription_html=\"#{@description_html}\"\nfollowers=#{@followers}\ndefault_version_id=#{@default_version_id}\ndescription=\"#{@description}\"\n"
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
data/lib/kerbalstuff/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: KerbalStuff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A simple API wrapper for KerbalStuff
|
15
15
|
email: rockytvbr@gmail.com
|