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 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
- user.characters.each do |character|
16
- character.accounts.each do |account|
17
- account.transactions.each do |transaction|
18
- puts "transaction: #{transaction.id} [date=#{transaction.date.strftime("%Y-%m-%d %H:%m")}]"
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
- account.journal.each do |entry|
21
- puts "journal entry: #{entry.id} [balance=#{entry.balance}]"
19
+ character.corporation.members.each do |member|
20
+ puts "corp member: #{member.id} [name=#{member.name}]"
22
21
  end
23
- end
24
- character.corporation.members.each do |member|
25
- puts "corp member: #{member.id} [name=#{member.name}]"
26
- end
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
@@ -2,7 +2,7 @@ module EveAPI #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -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.0</a>
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 =&gt; 'user id', :api_key =&gt; 'my_long_api_key')
60
- api.users.first.characters do |character|
61
- puts character.name
62
- character.accounts.each do |account|
63
- puts "#{account.key}: #{account.balance}"
58
+ api = EveAPI::API.new(:id =&gt; 'user id', :api_key =&gt; '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
 
@@ -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 => 'my_long_api_key')
19
- api.users.first.characters do |character|
20
- puts character.name
21
- character.accounts.each do |account|
22
- puts "#{account.key}: #{account.balance}"
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
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: eve-api
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
6
+ version: 0.1.1
7
7
  date: 2007-06-26 00:00:00 -04:00
8
8
  summary: EVE API Support
9
9
  require_paths: