socialyzer 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,9 @@ module Socialyzer
7
7
  initializer "setup" do |app|
8
8
  config_file = File.join(app.root,"config","socialyzer.yml")
9
9
  if File.exist?(config_file)
10
- Socialyzer::API_KEY = YAML.load_file(config_file)["api_key"]
10
+ config = YAML.load_file(config_file)
11
+ Socialyzer::API_KEY = config["api_key"] if config["api_key"]
12
+ Socialyzer::BASE_URL = config["api_url"] || "http://api.socialyzerhq.com"
11
13
  end
12
14
  end
13
15
 
@@ -1,3 +1,3 @@
1
1
  module Socialyzer
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/socialyzer.rb CHANGED
@@ -37,6 +37,12 @@ module Socialyzer
37
37
  api_request(:bitly_links, :user => screen_name)
38
38
  end
39
39
 
40
+ # Not really supported yet
41
+ #
42
+ def self.bulk_add_twitter_account(options={})
43
+ api_request(:bulk_add_twitter_account, options)
44
+ end
45
+
40
46
  def self.api_request(action, options={})
41
47
  env = options.delete(:env) || :production
42
48
  options.merge!(:key => API_KEY)
@@ -45,8 +51,7 @@ module Socialyzer
45
51
  end
46
52
 
47
53
  def self.api_action(action, env=:production)
48
- subdomain = env == :production ? "api" : "dev"
49
- "http://#{subdomain}.socialyzerhq.com/api/#{action}.json"
54
+ "#{Socialyzer::BASE_URL}/#{action}.json"
50
55
  end
51
56
 
52
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
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: 2012-12-30 00:00:00.000000000Z
12
+ date: 2012-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 1.8.19
75
+ rubygems_version: 1.8.23
76
76
  signing_key:
77
77
  specification_version: 3
78
78
  summary: A ruby library for dealing with the Socialyzer API