-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
W-6115601 Update all functions to use Authorization header (#40)
Update calls to use Authorization header instead of query string
- Loading branch information
Jared Pearson
authored
May 7, 2019
1 parent
e8cfc06
commit 418d66f
Showing
14 changed files
with
64 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Pardot | ||
VERSION = "1.2.0" | ||
VERSION = "1.3.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,13 +29,14 @@ def sample_results | |
end | ||
|
||
it "should take in some arguments" do | ||
fake_get "/api/opportunity/version/3/do/query?api_key=my_api_key&id_greater_than=200&format=simple&user_key=bar", sample_results | ||
fake_get "/api/opportunity/version/3/do/query?id_greater_than=200&format=simple", sample_results | ||
|
||
@client.opportunities.query(:id_greater_than => 200).should == {"total_results" => 2, | ||
"opportunity"=>[ | ||
{"type"=>"Great", "name"=>"Jim"}, | ||
{"type"=>"Good", "name"=>"Sue"} | ||
]} | ||
assert_authorization_header | ||
end | ||
|
||
end | ||
|
@@ -53,10 +54,11 @@ def sample_results | |
end | ||
|
||
it "should return the prospect" do | ||
fake_post "/api/opportunity/version/3/do/create/prospect_email/[email protected]?type=Good&api_key=my_api_key&user_key=bar&format=simple&name=Jim", sample_results | ||
fake_post "/api/opportunity/version/3/do/create/prospect_email/[email protected]?type=Good&format=simple&name=Jim", sample_results | ||
|
||
@client.opportunities.create_by_email("[email protected]", :name => "Jim", :type => "Good").should == {"name"=>"Jim", "type"=>"Good"} | ||
|
||
|
||
assert_authorization_header | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,14 @@ def sample_results | |
end | ||
|
||
it "should take in some arguments" do | ||
fake_get "/api/prospect/version/3/do/query?assigned=true&format=simple&user_key=bar&api_key=my_api_key", sample_results | ||
fake_get "/api/prospect/version/3/do/query?assigned=true&format=simple", sample_results | ||
|
||
@client.prospects.query(:assigned => true).should == {"total_results" => 2, | ||
"prospect"=>[ | ||
{"last_name"=>"Smith", "first_name"=>"Jim"}, | ||
{"last_name"=>"Green", "first_name"=>"Sue"} | ||
]} | ||
assert_authorization_header | ||
end | ||
|
||
end | ||
|
@@ -50,10 +51,10 @@ def sample_results | |
end | ||
|
||
it "should return the prospect" do | ||
fake_post "/api/prospect/version/3/do/create/email/[email protected]?api_key=my_api_key&user_key=bar&format=simple&first_name=Jim", sample_results | ||
fake_post "/api/prospect/version/3/do/create/email/[email protected]?format=simple&first_name=Jim", sample_results | ||
|
||
@client.prospects.create("[email protected]", :first_name => "Jim").should == {"last_name"=>"Smith", "first_name"=>"Jim"} | ||
|
||
assert_authorization_header | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,13 +29,14 @@ def sample_results | |
end | ||
|
||
it "should take in some arguments" do | ||
fake_get "/api/user/version/3/do/query?api_key=my_api_key&user_key=bar&id_greater_than=200&format=simple", sample_results | ||
fake_get "/api/user/version/3/do/query?id_greater_than=200&format=simple", sample_results | ||
|
||
@client.users.query(:id_greater_than => 200).should == {"total_results" => 2, | ||
"user"=>[ | ||
{"email"=>"[email protected]", "first_name"=>"Jim"}, | ||
{"email"=>"[email protected]", "first_name"=>"Sue"} | ||
]} | ||
assert_authorization_header | ||
end | ||
|
||
end | ||
|
@@ -53,10 +54,10 @@ def sample_results | |
end | ||
|
||
it "should return the prospect" do | ||
fake_post "/api/user/version/3/do/read/email/[email protected]?api_key=my_api_key&user_key=bar&format=simple", sample_results | ||
fake_post "/api/user/version/3/do/read/email/[email protected]?format=simple", sample_results | ||
|
||
@client.users.read_by_email("[email protected]").should == {"email"=>"[email protected]", "first_name"=>"Sue"} | ||
|
||
assert_authorization_header | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters