eve-api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +19 -24
- data/lib/eve-api/version.rb +1 -1
- data/website/index.html +21 -7
- data/website/index.txt +20 -6
- metadata +1 -1
data/README.txt
CHANGED
@@ -1,33 +1,28 @@
|
|
1
|
-
Eve API Support
|
2
|
-
|
1
|
+
Eve Online API Support
|
2
|
+
======================
|
3
3
|
|
4
|
-
Some docs will go here. See tests/general.rb for usage examples
|
5
|
-
|
6
|
-
Run general.rb using the following command:
|
7
|
-
cd lib && ruby ../tests/general.rb
|
8
|
-
|
9
4
|
Basic example:
|
10
5
|
|
11
|
-
require 'eve-api'
|
6
|
+
require 'eve-api'
|
12
7
|
|
13
|
-
api = EveAPI::API.new(:id => 'user id', :api_key => 'api key')
|
14
|
-
api.users.each do |user|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
8
|
+
api = EveAPI::API.new(:id => 'user id', :api_key => 'api key')
|
9
|
+
api.users.each do |user|
|
10
|
+
user.characters.each do |character|
|
11
|
+
character.accounts.each do |account|
|
12
|
+
account.transactions.each do |transaction|
|
13
|
+
puts "transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
14
|
+
end
|
15
|
+
account.journal.each do |entry|
|
16
|
+
puts "journal entry: #{entry.id} [balance=#{entry.balance}]"
|
17
|
+
end
|
19
18
|
end
|
20
|
-
|
21
|
-
puts "
|
19
|
+
character.corporation.members.each do |member|
|
20
|
+
puts "corp member: #{member.id} [name=#{member.name}]"
|
22
21
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
character.corporation.accounts.each do |account|
|
28
|
-
account.transactions.each do |transaction|
|
29
|
-
puts "corp transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
22
|
+
character.corporation.accounts.each do |account|
|
23
|
+
account.transactions.each do |transaction|
|
24
|
+
puts "corp transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
25
|
+
end
|
30
26
|
end
|
31
27
|
end
|
32
28
|
end
|
33
|
-
end
|
data/lib/eve-api/version.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Eve Online Ruby Support</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/eve-api"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/eve-api" class="numbers">0.1.
|
36
|
+
<a href="http://rubyforge.org/projects/eve-api" class="numbers">0.1.1</a>
|
37
37
|
</div>
|
38
38
|
<h2 class="clear_left"><span class="caps">API</span> Client <span class="caps">SDK</span></h2>
|
39
39
|
|
@@ -53,14 +53,28 @@
|
|
53
53
|
|
54
54
|
|
55
55
|
<pre syntax="ruby">
|
56
|
-
require 'rubygems'
|
57
56
|
require 'eve-api'
|
58
57
|
|
59
|
-
api = EveAPI::API.new(:id => 'user id', :api_key => '
|
60
|
-
api.users.
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
api = EveAPI::API.new(:id => 'user id', :api_key => 'api key')
|
59
|
+
api.users.each do |user|
|
60
|
+
user.characters.each do |character|
|
61
|
+
character.accounts.each do |account|
|
62
|
+
account.transactions.each do |transaction|
|
63
|
+
puts "transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
64
|
+
end
|
65
|
+
account.journal.each do |entry|
|
66
|
+
puts "journal entry: #{entry.id} [balance=#{entry.balance}]"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
character.corporation.members.each do |member|
|
70
|
+
puts "corp member: #{member.id} [name=#{member.name}]"
|
71
|
+
end
|
72
|
+
character.corporation.accounts.each do |account|
|
73
|
+
account.transactions.each do |transaction|
|
74
|
+
puts "corp transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
64
78
|
end
|
65
79
|
</pre>
|
66
80
|
|
data/website/index.txt
CHANGED
@@ -12,14 +12,28 @@ The eve-api gem provides you with an object-oriented access to Eve Online's API.
|
|
12
12
|
h3. Demonstration of usage
|
13
13
|
|
14
14
|
<pre syntax="ruby">
|
15
|
-
require 'rubygems'
|
16
15
|
require 'eve-api'
|
17
16
|
|
18
|
-
api = EveAPI::API.new(:id => 'user id', :api_key => '
|
19
|
-
api.users.
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
api = EveAPI::API.new(:id => 'user id', :api_key => 'api key')
|
18
|
+
api.users.each do |user|
|
19
|
+
user.characters.each do |character|
|
20
|
+
character.accounts.each do |account|
|
21
|
+
account.transactions.each do |transaction|
|
22
|
+
puts "transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
23
|
+
end
|
24
|
+
account.journal.each do |entry|
|
25
|
+
puts "journal entry: #{entry.id} [balance=#{entry.balance}]"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
character.corporation.members.each do |member|
|
29
|
+
puts "corp member: #{member.id} [name=#{member.name}]"
|
30
|
+
end
|
31
|
+
character.corporation.accounts.each do |account|
|
32
|
+
account.transactions.each do |transaction|
|
33
|
+
puts "corp transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
23
37
|
end
|
24
38
|
</pre>
|
25
39
|
|