eloqua_api 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Eloqua
2
- class BulkClient < Client
2
+ class BulkClient < Eloqua::Client
3
3
  BULK_API_PATH = "/API/Bulk/1.0"
4
4
 
5
5
  def bulk_path(path)
@@ -1,4 +1,5 @@
1
1
  require 'net/https'
2
+ require 'json'
2
3
 
3
4
  module Eloqua
4
5
  class Client
@@ -1,5 +1,5 @@
1
1
  module Eloqua
2
- class RESTClient < Client
2
+ class RESTClient < Eloqua::Client
3
3
  REST_API_PATH = "/API/REST/1.0"
4
4
 
5
5
  def rest_path(path)
@@ -15,6 +15,14 @@ module Eloqua
15
15
  def get_segment(segment_id)
16
16
  get(rest_path("assets/contact/segment/#{segment_id}"))
17
17
  end
18
+
19
+ def get_campaign(campaign_id)
20
+ get(rest_path("assets/campaign/#{campaign_id}"))
21
+ end
22
+
23
+ def get_recent_campaigns
24
+ get(rest_path("assets/campaigns/recent"))
25
+ end
18
26
 
19
27
  def contact_activity(contact_id, options={})
20
28
  options["start_date"] ||= 1.year.ago.to_i
data/lib/eloqua_api.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'eloqua_api/client'
2
+ require 'eloqua_api/rest_client'
3
+ require 'eloqua_api/bulk_client'
4
+
metadata CHANGED
@@ -1,68 +1,65 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: eloqua_api
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- version: 0.0.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Nader Akhnoukh
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-10-12 00:00:00 Z
19
- dependencies: []
20
-
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: json
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
21
30
  description: Convenience wrapper for Eloqua REST and Bulk APIs
22
31
  email: nader@kapost.com
23
32
  executables: []
24
-
25
33
  extensions: []
26
-
27
34
  extra_rdoc_files: []
28
-
29
- files:
30
- - lib/eloqua/bulk_client.rb
31
- - lib/eloqua/client.rb
32
- - lib/eloqua/rest_client.rb
33
- - lib/eloqua.rb
34
- homepage: http://rubygems.org/gems/eloqua_api
35
- licenses: []
36
-
35
+ files:
36
+ - lib/eloqua_api/bulk_client.rb
37
+ - lib/eloqua_api/client.rb
38
+ - lib/eloqua_api/rest_client.rb
39
+ - lib/eloqua_api.rb
40
+ homepage: http://github.com/kapost/eloqua_api
41
+ licenses:
42
+ - MIT
37
43
  post_install_message:
38
44
  rdoc_options: []
39
-
40
- require_paths:
41
- - - lib
42
- required_ruby_version: !ruby/object:Gem::Requirement
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
43
48
  none: false
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- hash: 3
48
- segments:
49
- - 0
50
- version: "0"
51
- required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
54
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
60
59
  requirements: []
61
-
62
60
  rubyforge_project:
63
- rubygems_version: 1.8.10
61
+ rubygems_version: 1.8.24
64
62
  signing_key:
65
63
  specification_version: 3
66
64
  summary: Ruby Eloqua API Wrapper
67
65
  test_files: []
68
-
data/lib/eloqua.rb DELETED
@@ -1,4 +0,0 @@
1
- require File.expand_path('eloqua/client', File.dirname(__FILE__))
2
- require File.expand_path('eloqua/rest_client', File.dirname(__FILE__))
3
- require File.expand_path('eloqua/bulk_client', File.dirname(__FILE__))
4
-