Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added support for https only API

  • Loading branch information...
commit 18aae0fec7321fe2593d4bbd17d1803cdcff73c3 1 parent 81aac03
Juan Figuera authored
Showing with 73 additions and 54 deletions.
  1. +17 −0 .project
  2. +54 −52 lib/reve.rb
  3. +2 −2 reve.gemspec
View
17 .project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>reve</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.aptana.ide.core.unifiedBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.aptana.ruby.core.rubynature</nature>
+ </natures>
+</projectDescription>
View
106 lib/reve.rb
@@ -11,7 +11,7 @@
require 'rubygems'
require 'hpricot'
end
-require 'net/http'
+require 'net/https'
require 'uri'
require 'cgi'
require 'digest'
@@ -46,57 +46,57 @@ module Reve
# To use this pass the hash option :url => +location+ where +location+ is a String or URI class. See format_url_request documentation for more details.
class API
- @@alliances_url = 'http://api.eve-online.com/eve/AllianceList.xml.aspx'
- @@sovereignty_url = 'http://api.eve-online.com/map/Sovereignty.xml.aspx'
- @@reftypes_url = 'http://api.eve-online.com/eve/RefTypes.xml.aspx'
- @@skill_tree_url = 'http://api.eve-online.com/eve/SkillTree.xml.aspx'
- @@member_tracking_url = 'http://api.eve-online.com/corp/MemberTracking.xml.aspx'
- @@corporate_wallet_balance_url = 'http://api.eve-online.com/corp/AccountBalance.xml.aspx'
- @@personal_wallet_balance_url = 'http://api.eve-online.com/char/AccountBalance.xml.aspx'
- @@corporate_wallet_trans_url = 'http://api.eve-online.com/corp/WalletTransactions.xml.aspx'
- @@personal_wallet_trans_url = 'http://api.eve-online.com/char/WalletTransactions.xml.aspx'
- @@corporate_wallet_journal_url = 'http://api.eve-online.com/corp/WalletJournal.xml.aspx'
- @@personal_wallet_journal_url = 'http://api.eve-online.com/char/WalletJournal.xml.aspx'
- @@characters_url = 'http://api.eve-online.com/account/Characters.xml.aspx'
- @@training_skill_url = 'http://api.eve-online.com/char/SkillInTraining.xml.aspx'
- @@skill_queue_url = 'http://api.eve-online.com/char/SkillQueue.xml.aspx'
- @@character_sheet_url = 'http://api.eve-online.com/char/CharacterSheet.xml.aspx'
- @@starbases_url = 'http://api.eve-online.com/corp/StarbaseList.xml.aspx'
- @@starbasedetail_url = 'http://api.eve-online.com/corp/StarbaseDetail.xml.aspx'
- @@conqurable_outposts_url = 'http://api.eve-online.com/eve/ConquerableStationList.xml.aspx'
- @@corporation_sheet_url = 'http://api.eve-online.com/corp/CorporationSheet.xml.aspx'
- @@corporation_member_security_url = 'http://api.eve-online.com/corp/MemberSecurity.xml.aspx'
- @@errors_url = 'http://api.eve-online.com/eve/ErrorList.xml.aspx'
- @@map_jumps_url = 'http://api.eve-online.com/map/Jumps.xml.aspx'
- @@map_kills_url = 'http://api.eve-online.com/map/Kills.xml.aspx'
- @@personal_market_orders_url = 'http://api.eve-online.com/char/MarketOrders.xml.aspx'
- @@corporate_market_orders_url = 'http://api.eve-online.com/corp/MarketOrders.xml.aspx'
- @@personal_industry_jobs_url = 'http://api.eve-online.com/char/IndustryJobs.xml.aspx'
- @@corporate_industry_jobs_url = 'http://api.eve-online.com/corp/IndustryJobs.xml.aspx'
- @@personal_assets_url = 'http://api.eve-online.com/char/AssetList.xml.aspx'
- @@corporate_assets_url = 'http://api.eve-online.com/corp/AssetList.xml.aspx'
- @@personal_kills_url = 'http://api.eve-online.com/char/KillLog.xml.aspx'
- @@corporate_kills_url = 'http://api.eve-online.com/corp/KillLog.xml.aspx'
- @@character_id_url = 'http://api.eve-online.com/eve/CharacterID.xml.aspx' # ?names=CCP%20Garthagk
- @@character_name_url = 'http://api.eve-online.com/eve/CharacterName.xml.aspx' # ?ids=797400947
- @@personal_faction_war_stats_url= 'http://api.eve-online.com/char/FacWarStats.xml.aspx'
- @@corporate_faction_war_stats_url= 'http://api.eve-online.com/corp/FacWarStats.xml.aspx'
- @@general_faction_war_stats_url= 'http://api.eve-online.com/eve/FacWarStats.xml.aspx'
- @@top_faction_war_stats_url = 'http://api.eve-online.com/eve/FacWarTopStats.xml.aspx'
- @@faction_war_occupancy_url = 'http://api.eve-online.com/map/FacWarSystems.xml.aspx'
- @@certificate_tree_url = 'http://api.eve-online.com/eve/CertificateTree.xml.aspx'
- @@character_medals_url = 'http://api.eve-online.com/char/Medals.xml.aspx'
- @@corporate_medals_url = 'http://api.eve-online.com/corp/Medals.xml.aspx'
- @@corp_member_medals_url = 'http://api.eve-online.com/corp/MemberMedals.xml.aspx'
- @@server_status_url = 'http://api.eve-online.com/Server/ServerStatus.xml.aspx'
- @@research_url = 'http://api.eve-online.com/char/Research.xml.aspx'
- @@personal_notification_url = 'http://api.eve-online.com/char/Notifications.xml.aspx'
- @@personal_mailing_lists_url = 'http://api.eve-online.com/char/mailinglists.xml.aspx'
- @@personal_mail_messages_url = 'http://api.eve-online.com/char/MailMessages.xml.aspx'
- @@personal_contacts_url = 'http://api.eve-online.com/char/ContactList.xml.aspx'
- @@corporate_contacts_url = 'http://api.eve-online.com/corp/ContactList.xml.aspx'
- @@account_status_url = 'http://api.eve-online.com/account/AccountStatus.xml.aspx'
- @@character_info_url = 'http://api.eve-online.com/eve/CharacterInfo.xml.aspx'
+ @@alliances_url = 'https://api.eve-online.com/eve/AllianceList.xml.aspx'
+ @@sovereignty_url = 'https://api.eve-online.com/map/Sovereignty.xml.aspx'
+ @@reftypes_url = 'https://api.eve-online.com/eve/RefTypes.xml.aspx'
+ @@skill_tree_url = 'https://api.eve-online.com/eve/SkillTree.xml.aspx'
+ @@member_tracking_url = 'https://api.eve-online.com/corp/MemberTracking.xml.aspx'
+ @@corporate_wallet_balance_url = 'https://api.eve-online.com/corp/AccountBalance.xml.aspx'
+ @@personal_wallet_balance_url = 'https://api.eve-online.com/char/AccountBalance.xml.aspx'
+ @@corporate_wallet_trans_url = 'https://api.eve-online.com/corp/WalletTransactions.xml.aspx'
+ @@personal_wallet_trans_url = 'https://api.eve-online.com/char/WalletTransactions.xml.aspx'
+ @@corporate_wallet_journal_url = 'https://api.eve-online.com/corp/WalletJournal.xml.aspx'
+ @@personal_wallet_journal_url = 'https://api.eve-online.com/char/WalletJournal.xml.aspx'
+ @@characters_url = 'https://api.eve-online.com/account/Characters.xml.aspx'
+ @@training_skill_url = 'https://api.eve-online.com/char/SkillInTraining.xml.aspx'
+ @@skill_queue_url = 'https://api.eve-online.com/char/SkillQueue.xml.aspx'
+ @@character_sheet_url = 'https://api.eve-online.com/char/CharacterSheet.xml.aspx'
+ @@starbases_url = 'https://api.eve-online.com/corp/StarbaseList.xml.aspx'
+ @@starbasedetail_url = 'https://api.eve-online.com/corp/StarbaseDetail.xml.aspx'
+ @@conqurable_outposts_url = 'https://api.eve-online.com/eve/ConquerableStationList.xml.aspx'
+ @@corporation_sheet_url = 'https://api.eve-online.com/corp/CorporationSheet.xml.aspx'
+ @@corporation_member_security_url = 'https://api.eve-online.com/corp/MemberSecurity.xml.aspx'
+ @@errors_url = 'https://api.eve-online.com/eve/ErrorList.xml.aspx'
+ @@map_jumps_url = 'https://api.eve-online.com/map/Jumps.xml.aspx'
+ @@map_kills_url = 'https://api.eve-online.com/map/Kills.xml.aspx'
+ @@personal_market_orders_url = 'https://api.eve-online.com/char/MarketOrders.xml.aspx'
+ @@corporate_market_orders_url = 'https://api.eve-online.com/corp/MarketOrders.xml.aspx'
+ @@personal_industry_jobs_url = 'https://api.eve-online.com/char/IndustryJobs.xml.aspx'
+ @@corporate_industry_jobs_url = 'https://api.eve-online.com/corp/IndustryJobs.xml.aspx'
+ @@personal_assets_url = 'https://api.eve-online.com/char/AssetList.xml.aspx'
+ @@corporate_assets_url = 'https://api.eve-online.com/corp/AssetList.xml.aspx'
+ @@personal_kills_url = 'https://api.eve-online.com/char/KillLog.xml.aspx'
+ @@corporate_kills_url = 'https://api.eve-online.com/corp/KillLog.xml.aspx'
+ @@character_id_url = 'https://api.eve-online.com/eve/CharacterID.xml.aspx' # ?names=CCP%20Garthagk
+ @@character_name_url = 'https://api.eve-online.com/eve/CharacterName.xml.aspx' # ?ids=797400947
+ @@personal_faction_war_stats_url= 'https://api.eve-online.com/char/FacWarStats.xml.aspx'
+ @@corporate_faction_war_stats_url= 'https://api.eve-online.com/corp/FacWarStats.xml.aspx'
+ @@general_faction_war_stats_url= 'https://api.eve-online.com/eve/FacWarStats.xml.aspx'
+ @@top_faction_war_stats_url = 'https://api.eve-online.com/eve/FacWarTopStats.xml.aspx'
+ @@faction_war_occupancy_url = 'https://api.eve-online.com/map/FacWarSystems.xml.aspx'
+ @@certificate_tree_url = 'https://api.eve-online.com/eve/CertificateTree.xml.aspx'
+ @@character_medals_url = 'https://api.eve-online.com/char/Medals.xml.aspx'
+ @@corporate_medals_url = 'https://api.eve-online.com/corp/Medals.xml.aspx'
+ @@corp_member_medals_url = 'https://api.eve-online.com/corp/MemberMedals.xml.aspx'
+ @@server_status_url = 'https://api.eve-online.com/Server/ServerStatus.xml.aspx'
+ @@research_url = 'https://api.eve-online.com/char/Research.xml.aspx'
+ @@personal_notification_url = 'https://api.eve-online.com/char/Notifications.xml.aspx'
+ @@personal_mailing_lists_url = 'https://api.eve-online.com/char/mailinglists.xml.aspx'
+ @@personal_mail_messages_url = 'https://api.eve-online.com/char/MailMessages.xml.aspx'
+ @@personal_contacts_url = 'https://api.eve-online.com/char/ContactList.xml.aspx'
+ @@corporate_contacts_url = 'https://api.eve-online.com/corp/ContactList.xml.aspx'
+ @@account_status_url = 'https://api.eve-online.com/account/AccountStatus.xml.aspx'
+ @@character_info_url = 'https://api.eve-online.com/eve/CharacterInfo.xml.aspx'
cattr_accessor :character_sheet_url, :training_skill_url, :characters_url, :personal_wallet_journal_url,
:corporate_wallet_journal_url, :personal_wallet_trans_url, :corporate_wallet_trans_url,
@@ -1109,6 +1109,8 @@ def get_xml(source,opts)
# ||= to prevent making a new Net::HTTP object, the res = nil above should reset this for the next request.
# the request needs to be here to rescue exceptions from it.
http ||= Net::HTTP.new(source.host, source.port)
+ http.use_ssl = true
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE ##rework to use proper cert
http.open_timeout = 3
http.read_timeout = @timeout
res = http.start {|http| http.request(req) }
View
4 reve.gemspec
@@ -5,10 +5,10 @@
Gem::Specification.new do |s|
s.name = %q{reve}
- s.version = "0.1.0"
+ s.version = "0.1.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Lisa Seelye"]
+ s.authors = ["Lisa Seelye","Juan Figuera"]
s.date = %q{2012-02-05}
s.email = %q{lisa@thedoh.com}
s.extra_rdoc_files = [
Please sign in to comment.
Something went wrong with that request. Please try again.