eloqua-api-client 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa48c0148490fbb40f2885e1dd6e4f7237691ab80706ef0dd86159d58e8a2d92
4
- data.tar.gz: 73e7e4022c43ea49cbaae4a8472f7055b007cde0ca9918323f83e90e1a01a66a
3
+ metadata.gz: 4c3fc5bff032f46cc7cae69a97a9df5da3fc826c41aadba310b20478b36daffd
4
+ data.tar.gz: 0f4499f285e575bd85f32a48982820148dc7bdde9cb9aacc52ca7842ed29532f
5
5
  SHA512:
6
- metadata.gz: 47efeaab9fb0bdcca43474e8bb3a1bce9bee7c5662e701a92fc7c9bb1135006d50600e565c91e64b71ebe325f430a8e38408cf9e084b0342ab3d4227e6433232
7
- data.tar.gz: 9d7676d04fb0b3592743065171e4a8edca3a1b476e8a899837e0bef41b9c2577eaa6ab0b6f436a24494cb61a82e728daeef574c98d1bde6fca6468c084098be6
6
+ metadata.gz: 2a19cd85ca36c6eece0be7443363c0d96a107bab0c133ec067dbd49080a67d11a8dd132234d1ec37c3bd2b27ebc7b181c48ad31500ad9878b4402e2cf0875b90
7
+ data.tar.gz: 9bb8c2bc313f878bec2861513c9ff102c12ce6e639fba0541345917b3321f41c6f9b2c6ba86423b797c104876bb4fa2b068635b4f7daa9b03a89d6f3b45ce9f1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eloqua-api (0.1.0)
4
+ eloqua-api-client (0.1.3)
5
5
  httparty
6
6
 
7
7
  GEM
@@ -14,12 +14,12 @@ GEM
14
14
  rexml
15
15
  diff-lcs (1.4.4)
16
16
  hashdiff (1.0.1)
17
- httparty (0.18.1)
17
+ httparty (0.20.0)
18
18
  mime-types (~> 3.0)
19
19
  multi_xml (>= 0.5.2)
20
- mime-types (3.3.1)
20
+ mime-types (3.4.1)
21
21
  mime-types-data (~> 3.2015)
22
- mime-types-data (3.2021.0901)
22
+ mime-types-data (3.2022.0105)
23
23
  multi_xml (0.6.0)
24
24
  parallel (1.20.1)
25
25
  parser (3.0.2.0)
@@ -67,7 +67,7 @@ PLATFORMS
67
67
 
68
68
  DEPENDENCIES
69
69
  bundler (~> 1.17)
70
- eloqua-api!
70
+ eloqua-api-client!
71
71
  rake (~> 10.0)
72
72
  rspec (~> 3.0)
73
73
  rspec_junit_formatter
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Eloqua::Api
1
+ # Eloqua Api Client
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/eloqua/api/base`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Eloqua Api Client is a Context Based Ruby Gem for calling Eloqua APIs.
6
4
 
7
5
  ## Installation
8
6
 
@@ -14,70 +12,83 @@ gem 'eloqua-api-client'
14
12
 
15
13
  And then execute:
16
14
 
17
- $ bundle
15
+ ```ruby
16
+ bundle
17
+ ```
18
18
 
19
19
  Or install it yourself as:
20
20
 
21
- $ gem install eloqua-api
21
+ ``` ruby
22
+ gem install eloqua-api-client
23
+ ```
22
24
 
23
25
  ## Usage
24
26
 
25
27
  ```ruby
26
- # To setup the client for ExternalAssetTypes
27
- client = ::Eloqua::EloquaExternalAssetsTypes.new(
28
- access_token: 'YOUR-ACCESS-TOKEN', # e.g. djbhyghb27t36hbdhbkjn7y7bhk
29
- base_url: 'YOUR-BASE-URL') # e.g. 'https://eloqua-api.com/API/REST/{version}'
28
+ # to work with Eloqua Campaigns Initialize Client
29
+ client = Eloqua::Api::Campaign.new(access_token: 'YOUR-TOKEN', base_url: 'YOUR_BASE_URL')
30
+ ```
31
+ ### Eloqua Campaigns Docs
32
+ To get an idea about ```params```
33
+
34
+ https://docs.oracle.com/en/cloud/saas/marketing/eloqua-rest-api/api-application-2.0-campaigns.html
30
35
 
31
- # Getting all ExternalAssetTypes
36
+ ```ruby
37
+ # To Fetch All Campaigns From Eloqua
32
38
  client.find_all
33
- # Finding based on some condition like fetching campaigns having active status or
34
- # based on name or paginated campaigns you can use optional params
35
-
36
- find_all method accepts two optional params
37
- 1- query_params # mostly for pagination
38
- 2- search_params # for fetching ExternalAssetType objects based on some conditions
39
-
40
- # Example below fetchs all the ASSET TYPES by paginating them
41
- client.find_all(query_params: { page: 1, count: 100 })
42
-
43
- # similarly search_params: {} will search for the specific keys added in the hash
44
-
45
- # If we want to fetch the Specific ASSET ACTIVITIES simply hit
46
- client.find(id: 'my asset_type_id')
47
-
48
- # To setup the client for Campaigns
49
-
50
- client = ::Eloqua::Campaign.new(
51
- access_token: 'YOUR-ACCESS-TOKEN', # e.g. djbhyghb27t36hbdhbkjn7y7bhk
52
- base_url: 'YOUR-BASE-URL') # e.g. 'https://eloqua-api.com/API/REST/{version}'
53
-
54
- # Same here to get all the campaigns
55
-
56
- client.find_all
57
-
58
- # find_all method accepts two optional params
59
- 1- query_params # mostly for pagination
60
-
61
- 2- search_params # for fetching campaigns based on some conditions
62
-
63
- # If Campaigns based on some condtions are needed to be fetched
64
-
65
- # Lets Say we want to get all active campaigns
66
-
67
- client.find_all(search_params: { currentStatus: 1 })
68
- # It will get all the campaigns which are active similarly you can add other
69
- # query key values based on searchable from eloqua documentation
70
-
71
- # https://docs.oracle.com/en/cloud/saas/marketing/eloqua-develop/Developers/RESTAPI/Tutorials/search_parameter.htm?cshid=SearchParam
72
-
73
- # If we want to fetch all those campaigns which are active and name like 'some-name'
74
- client.find_all(search_params: { currentStatus: 1, name: 'some-name' })
75
-
76
- # Every time we pass search_params it will do a partials searching
77
-
78
- # To Fetch Only a Specific Campaign
79
-
80
- client.find(id: 'campaign_id')
39
+ # To Fetch All Campaigns Based On Pagination pass named param query_params to find_all
40
+ # I want to get campaigns such that each page has 100 campaigns on it
41
+ # I will pass the page and the count in query param to achieve that
42
+ client.find_all(query_params: { page: 1, count: 100 })
43
+
44
+ # Similarly to fetch campaigns based on NAME, status etc
45
+ client.find_all(search_params: { name: 'My Gem', currentStatus: 1 })
46
+
47
+ # Both saerch_params and query_params are optional can be used together also
48
+
49
+ ```
50
+ ### Note
51
+ In the Gem All ```find_all``` accepts two optional ```HASH Params``` ```search_params: {}``` and ```query_params: {}```
52
+
53
+ ### Find Campaign
54
+ ```ruby
55
+ # returns Campaign against provided Id
56
+ client.find(id: 'campaign_id')
57
+ # id is required param
58
+ ```
59
+ ### Create Campaign
60
+ ```ruby
61
+ # returns created campaign
62
+ client.create(payload: { name: 'my eloqua campaign', startAt: 1234444, endAt: 120987,...})
63
+ # parload is required param
64
+ ```
65
+
66
+ ### Update Campaign
67
+ ```ruby
68
+ # returns updated campaign
69
+ client.update(id: 'id',payload: { name: 'new name', startAt: 1234444, endAt: 12098 })
70
+ # id and parload both are required params.
71
+ # please have a look at eloqua documentation for payload
72
+ ```
73
+
74
+ ### Activate Campaign
75
+ ```ruby
76
+ # returns activated campaign
77
+ client.activate(id: 'id', query_params: { activate: true })
78
+ # id and query_params both are required params.
79
+ ```
80
+
81
+ ### DeActivate Campaign
82
+ ```ruby
83
+ # returns deactivate campaign
84
+ client.deactivate(id: 'id')
85
+ # id is required param.
86
+ ```
87
+
88
+ ### Delete A Campaign
89
+ ```ruby
90
+ client.destroy(id: 'id')
91
+ # id is required param.
81
92
  ```
82
93
 
83
94
 
@@ -89,12 +100,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
89
100
 
90
101
  ## Contributing
91
102
 
92
- Bug reports and pull requests are welcome on GitHub at https://github.com/osama-inayat/eloqua-api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
103
+ Bug reports and pull requests are welcome on GitHub at https://github.com/osama-inayat/eloqua-api. This project is intended to be a safe, welcoming space for collaboration.
93
104
 
94
105
  ## License
95
106
 
96
107
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
97
-
98
- ## Code of Conduct
99
-
100
- Everyone interacting in the Eloqua::Api::Wrapper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/osama-inayat/eloqua-api/blob/master/CODE_OF_CONDUCT.md).
@@ -34,5 +34,9 @@ ELOQUA_ENDPOINTS = {
34
34
  delete_campaign: {
35
35
  endpoint: '/assets/campaign/{id}',
36
36
  method: :delete
37
+ }.freeze,
38
+ create_external_activity: {
39
+ endpoint: '/data/activity',
40
+ method: :post
37
41
  }.freeze
38
42
  }.freeze
@@ -10,6 +10,10 @@ module Eloqua
10
10
  def find(id:)
11
11
  load_and_execute(api: 'single_asset_activities', id: id)
12
12
  end
13
+
14
+ def create_external_activity(payload:)
15
+ load_and_execute(api: 'create_external_activity', payload: payload)
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -1,7 +1,7 @@
1
1
  module Eloqua
2
2
  module Api
3
3
  module Wrapper
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eloqua-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Osama Inayat
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2022-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description:
111
+ description:
112
112
  email:
113
113
  - 83946734+osama-inayat@users.noreply.github.com
114
114
  executables: []
@@ -146,7 +146,7 @@ homepage: https://github.com/osama-inayat/eloqua-api
146
146
  licenses:
147
147
  - MIT
148
148
  metadata: {}
149
- post_install_message:
149
+ post_install_message:
150
150
  rdoc_options: []
151
151
  require_paths:
152
152
  - lib
@@ -161,8 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.0.3
165
- signing_key:
164
+ rubygems_version: 3.3.3
165
+ signing_key:
166
166
  specification_version: 4
167
167
  summary: For Communicating with the eloqua api's .
168
168
  test_files: []