From 5b45cdc91d7c60bffd68db1afd75bbce4241dcca Mon Sep 17 00:00:00 2001 From: Johnny Khai Nguyen Date: Tue, 8 Jun 2010 10:40:17 -0500 Subject: [PATCH] deleted stuff --- lib/openfooty/auth.rb | 29 ------------------------ lib/openfooty/betting.rb | 30 ------------------------- lib/openfooty/channel.rb | 31 -------------------------- lib/openfooty/community.rb | 34 ---------------------------- lib/openfooty/league.rb | 40 --------------------------------- lib/openfooty/match.rb | 37 ------------------------------- lib/openfooty/player.rb | 32 --------------------------- lib/openfooty/team.rb | 45 -------------------------------------- lib/openfooty/video.rb | 31 -------------------------- test/test_helper.rb | 3 --- 10 files changed, 312 deletions(-) delete mode 100644 lib/openfooty/auth.rb delete mode 100644 lib/openfooty/betting.rb delete mode 100644 lib/openfooty/channel.rb delete mode 100644 lib/openfooty/community.rb delete mode 100644 lib/openfooty/league.rb delete mode 100644 lib/openfooty/match.rb delete mode 100644 lib/openfooty/player.rb delete mode 100644 lib/openfooty/team.rb delete mode 100644 lib/openfooty/video.rb delete mode 100644 test/test_helper.rb diff --git a/lib/openfooty/auth.rb b/lib/openfooty/auth.rb deleted file mode 100644 index 3436594..0000000 --- a/lib/openfooty/auth.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Openfooty - - class Auth - include HTTParty - base_uri "http://api.openfooty.org/1.0/auth." - - attr_reader :api_key - - # Usage - # Openfooty::Auth.new("getQuota").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/betting.rb b/lib/openfooty/betting.rb deleted file mode 100644 index a6c78fa..0000000 --- a/lib/openfooty/betting.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Openfooty - - class Betting - include HTTParty - base_uri "http://api.openfooty.org/1.0/betting." - - attr_reader :api_key - - # Usage - # Openfooty::Betting.new("getEvents").fetch - # Openfooty::Betting.new("getMarkets", :event => "event_id").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/channel.rb b/lib/openfooty/channel.rb deleted file mode 100644 index c6c6ae5..0000000 --- a/lib/openfooty/channel.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Openfooty - - class Channel - include HTTParty - base_uri "http://api.openfooty.org/1.0/channel." - - attr_reader :api_key - - # Usage - # Openfooty::Channel.new("getBadge", :channel_id => "channel_id").fetch - # Openfooty::Channel.new("getIdents").fetch - # Openfooty::Channel.new("getVideos, :channel_id => "channel_id").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/community.rb b/lib/openfooty/community.rb deleted file mode 100644 index a0bc2bf..0000000 --- a/lib/openfooty/community.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Openfooty - - class Community - include HTTParty - base_uri "http://api.openfooty.org/1.0/community." - - attr_reader :api_key - - # Usage - # Openfooty::Community.new("getDFTable").fetch - # Openfooty::Community.new("getFanIQTable").fetch - # Openfooty::Community.new("getFanValTable).fetch - # Openfooty::Community.new("getForumThreads").fetch - # Openfooty::Community.new("getLatestUsers").fetch - # Openfooty::Community.new("getUserData").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/league.rb b/lib/openfooty/league.rb deleted file mode 100644 index e7b5162..0000000 --- a/lib/openfooty/league.rb +++ /dev/null @@ -1,40 +0,0 @@ -module Openfooty - - class League - include HTTParty - base_uri "http://api.openfooty.org/1.0/league." - - attr_reader :api_key - - # Usage - # Openfooty::League.new("getBadge", :league_id => 8).fetch - # Openfooty::League.new("getComments", :league_id => 8).fetch - # Openfooty::League.new("getFixtures", :league_id => 8).fetch - # Openfooty::League.new("getGuardianEditorial", :league_id => 8, :guardian_api_key => "").fetch - # Openfooty::League.new("getIdents", :league_id => 8).fetch - # Openfooty::League.new("getInjuredPlayers", :league_id => 8).fetch - # Openfooty::League.new("getPhotos"), :league_id => 8.fetch - # Openfooty::League.new("getPlayerStats", :league_id => 8).fetch - # Openfooty::League.new("getResults", :league_id => 8).fetch - # Openfooty::League.new("getTable", :league_id => 8).fetch - # Openfooty::League.new("getTeams", :league_id => 8).fetch - # Openfooty::League.new("getVideos", :league_id => 8).fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/match.rb b/lib/openfooty/match.rb deleted file mode 100644 index 91628e1..0000000 --- a/lib/openfooty/match.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Openfooty - - class Match - include HTTParty - base_uri "http://api.openfooty.org/1.0/match." - - attr_reader :api_key - - # Usage - # Openfooty::Match.new("getComments", :match_id => "id").fetch - # Openfooty::Match.new("getGoalsOfTheWeek").fetch - # Openfooty::Match.new("getGuardianCommentary", :match_id => "id", :guardian_api_key => "").fetch - # Openfooty::Match.new("getGuardianMatchReport", :match_id => "id", :guardian_api_key => "").fetch - # Openfooty::Match.new("getMostExciting").fetch - # Openfooty::Match.new("getMostPopular").fetch - # Openfooty::Match.new("getPhotos", :match_id => "id").fetch - # Openfooty::Match.new("getStats", :match_id => "id").fetch - # Openfooty::Match.new("getVideos", :match_id => "id").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/player.rb b/lib/openfooty/player.rb deleted file mode 100644 index c946638..0000000 --- a/lib/openfooty/player.rb +++ /dev/null @@ -1,32 +0,0 @@ -module Openfooty - - class Player - include HTTParty - base_uri "http://api.openfooty.org/1.0/player." - - attr_reader :api_key - - # Usage - # Openfooty::Player.new("getDreamFootyStats", :player_id => "id").fetch - # Openfooty::Player.new("getProfilePhoto", :player_id => "id").fetch - # Openfooty::Player.new("getQuotes", :player_id => "id").fetch - # Openfooty::Player.new("getStats", :league_id => :player_id => "id").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/team.rb b/lib/openfooty/team.rb deleted file mode 100644 index 930446c..0000000 --- a/lib/openfooty/team.rb +++ /dev/null @@ -1,45 +0,0 @@ -module Openfooty - - class Team - include HTTParty - base_uri "http://api.openfooty.org/1.0/team." - - attr_reader :api_key - - # Usage - # Openfooty::Team.new("getBadge", :team_id => "id").fetch - # Openfooty::Team.new("getBlogs", :team_id => "id").fetch - # Openfooty::Team.new("getComments", :team_id => "id").fetch - # Openfooty::Team.new("getFans", :team_id => "id").fetch - # Openfooty::Team.new("getFixtures", :team_id => "id").fetch - # Openfooty::Team.new("getGuardianEditorial", :team_id => "id", :guardian_api_key => "").fetch - # Openfooty::Team.new("getGuardianMedia", :team_id => "id", :guardian_api_key => "").fetch - # Openfooty::Team.new("getInjuredPlayers", :team_id => "id").fetch - # Openfooty::Team.new("getNews", :team_id => "id").fetch - # Openfooty::Team.new("getPhotos", :team_id => "id").fetch - # Openfooty::Team.new("getPodcasts", :team_id => "id").fetch - # Openfooty::Team.new("getQuotes", :team_id => "id").fetch - # Openfooty::Team.new("getResults", :team_id => "id").fetch - # Openfooty::Team.new("getSquad", :team_id => "id").fetch - # Openfooty::Team.new("getStats", :league_id => "id", :team_id => "id").fetch - # Openfooty::Team.new("getVideos", :team_id => "id").fetch - # Openfooty::Team.new("getWiki", :team_id => "id").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/lib/openfooty/video.rb b/lib/openfooty/video.rb deleted file mode 100644 index ba3421a..0000000 --- a/lib/openfooty/video.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Openfooty - - class Video - include HTTParty - base_uri "http://api.openfooty.org/1.0/video." - - attr_reader :api_key - - # Usage - # Openfooty::Video.new("getCompilations").fetch - # Openfooty::Video.new("getLatest").fetch - # Openfooty::Video.new("getNews").fetch - - def initialize(name, options={}) - @name = name - @api_key = options[:api_key] || Openfooty.api_key - @options = options - end - - def fetch - response = self.class.get("#{@name}", :query => @options.merge(self.default_options)) - end - - protected - - def default_options - {:api_key => @api_key, :format => :json} - end - end - -end \ No newline at end of file diff --git a/test/test_helper.rb b/test/test_helper.rb deleted file mode 100644 index cf148b8..0000000 --- a/test/test_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'rubygems' -require 'active_support' -require 'active_support/test_case' \ No newline at end of file