backtype 0.0.1.2 → 0.1.2

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.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Adolfo Builes
1
+ Copyright (c) 2011 Adolfo Builes
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -5,4 +5,42 @@ BackType is a marketing intelligence company that develops products and services
5
5
 
6
6
  This is a simple Ruby gem wrapper for their API.
7
7
 
8
- Note that this wrapper doesn't work for the services in beta or paid.
8
+ Note that this wrapper doesn't work for the services in beta or paid.
9
+
10
+ Synopsis
11
+ ========
12
+
13
+ Install from RubyGems
14
+ gem install backtype
15
+
16
+ Require it in your files:
17
+
18
+ require 'backtype'
19
+
20
+ backtype = Backtype::Base.new(:api_key => your_api_key)
21
+ backtype.comments_search :q => 'ruby AND chunky AND bakon'
22
+
23
+ The following are the current supported methods:
24
+
25
+ backtype.comments_by_author_url
26
+ backtype.comments_by_page
27
+ backtype.comments_search
28
+ backtype.comments_stats_by_page
29
+ backtype.connect
30
+ backtype.connect_stats
31
+ backtype.stats_by_url
32
+ backtype.user_influencer_score
33
+ backtype.user_influenced_by
34
+ backtype.user_influencer_of
35
+ backtype.user_top_sites
36
+
37
+ You can check the parameters for each
38
+ of the methods in http://www.backtype.com/developers.
39
+
40
+ Author
41
+ ======
42
+
43
+ Adolfo Builes, builes.adolfo@googlemail.com
44
+
45
+ Copyright (c) 2011
46
+
data/Rakefile CHANGED
@@ -11,3 +11,4 @@ end
11
11
  desc 'Default: run specs.'
12
12
  task :default => 'spec'
13
13
 
14
+
@@ -1,4 +1,2 @@
1
1
  require 'backtype/base'
2
2
  require 'backtype/error'
3
-
4
-
@@ -75,7 +75,6 @@ module Backtype
75
75
  end
76
76
 
77
77
  def make_request(service, params)
78
- raise NotParametersGiven if params.empty?
79
78
  q = params.merge({:key => @api_key })
80
79
  format = params.delete(:format) || DEFAULT_FORMAT
81
80
  uri = "#{BASE_URL}#{service}.#{format}"
@@ -1,8 +1,8 @@
1
1
  module Backtype
2
2
  ERRORS = {
3
- :api_key => {:klass_name => "NotAPIKeyGiven",
4
- :message => "You must pass an api_key as parameter" },
5
- :missing_param => {:klass_name => "MissingParameters"}
3
+ :api_key => {:klass_name => "NotAPIKeyGiven",
4
+ :message => "You must pass an api_key as parameter"},
5
+ :missing_params => {:klass_name => "MissingParameters"}
6
6
  }
7
7
 
8
8
  ERRORS.each_value do |error|
@@ -0,0 +1,3 @@
1
+ module Backtype
2
+ VERSION = "0.1.2"
3
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backtype
3
3
  version: !ruby/object:Gem::Version
4
- hash: 79
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
9
  - 2
11
- version: 0.0.1.2
10
+ version: 0.1.2
12
11
  platform: ruby
13
12
  authors:
14
13
  - Adolfo Builes
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2011-01-28 00:00:00 -05:00
18
+ date: 2011-01-29 00:00:00 -05:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -79,6 +78,7 @@ files:
79
78
  - LICENSE
80
79
  - lib/backtype/base.rb
81
80
  - lib/backtype/error.rb
81
+ - lib/backtype/version.rb
82
82
  - lib/backtype.rb
83
83
  has_rdoc: true
84
84
  homepage: http://github.com/abuiles/backtype