Skip to content

Commit 52099b9

Browse files
authored
Add support for additional end points. (#4)
## 0.4.0 (12/25/17) - Add support for CustomField, CustomRedirect API, EmailClicks, and Opportunity end points. - Client will change configured API version from 3 to 4 automatically upon login. - Fixed bug in VisitorQueryRequest around querying for multiple foreign key ids. - Fixed bug in ordering of request parameters.
1 parent 9db9315 commit 52099b9

File tree

70 files changed

+3947
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3947
-121
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
The format is based on [Keep a Changelog](http://keepachangelog.com/)
33
and this project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## 0.4.0 (12/25/17)
6+
- Add support for CustomField, CustomRedirect API, EmailClicks, and Opportunity end points.
7+
- Client will change configured API version from 3 to 4 automatically upon login.
8+
- Fixed bug in VisitorQueryRequest around querying for multiple foreign key ids.
9+
- Fixed bug in ordering of request parameters.
10+
511
## 0.3.0 (12/15/17)
612
- Add support for Visitor and VisitorActivity API endpoints.
713
- Bugfix to Prospect parser.
814

9-
1015
## 0.2.0 (11/11/17)
1116
- Support Api version 4 via configuration method .withApiVersion4()
1217
- Add support for List and ListMembership API endpoints.
1318

14-
1519
## 0.1.0 (08/15/17)
1620
- Initial release!

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This client library is released on Maven Central. Add a new dependency to your
2121
<dependency>
2222
<groupId>com.darksci</groupId>
2323
<artifactId>pardot-api-client</artifactId>
24-
<version>0.3.0</version>
24+
<version>0.4.0</version>
2525
</dependency>
2626
```
2727

@@ -110,6 +110,20 @@ Official Documentation: [Campaigns](http://developer.pardot.com/kb/api-version-3
110110
- Read
111111
- Update
112112

113+
### Custom Fields
114+
Official Documentation: [Custom Fields](http://developer.pardot.com/kb/api-version-3/custom-fields/)
115+
116+
- Create
117+
- Query
118+
- Read
119+
- Update
120+
121+
### Custom Redirects
122+
Official Documentation: [Custom Redirects](http://developer.pardot.com/kb/api-version-3/custom-redirects/)
123+
124+
- Query
125+
- Read
126+
113127
### Emails
114128
Official Documentation: [Emails](http://developer.pardot.com/kb/api-version-3/emails/)
115129

@@ -118,6 +132,11 @@ Official Documentation: [Emails](http://developer.pardot.com/kb/api-version-3/em
118132
- Sending One to One Emails
119133
- Stats
120134

135+
### Email Clicks
136+
Official Documentation: [Email Clicks](http://developer.pardot.com/kb/api-version-3/batch-email-clicks/)
137+
138+
- Query
139+
121140
### Lists
122141
Official Documentation: [Lists](http://developer.pardot.com/kb/api-version-3/lists/)
123142

@@ -134,6 +153,16 @@ Official Documentation: [ListMemberships](http://developer.pardot.com/kb/api-ver
134153
- Read
135154
- Update
136155

156+
### Opportunities
157+
Official Documentation: [Opportunities](http://developer.pardot.com/kb/api-version-3/opportunities/)
158+
159+
- Create
160+
- Delete
161+
- Query
162+
- Read
163+
- Undelete
164+
- Update
165+
137166
### Prospects
138167
Official Documentation: [Prospects](http://developer.pardot.com/kb/api-version-3/prospects/)
139168

pom.xml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.darksci</groupId>
88
<artifactId>pardot-api-client</artifactId>
9-
<version>0.3.0</version>
9+
<version>0.4.0</version>
1010
<packaging>jar</packaging>
1111

1212
<!-- Require Maven 3.3.9 -->
@@ -47,7 +47,7 @@
4747
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4848

4949
<!-- Jackson version -->
50-
<jackson.version>2.9.0</jackson.version>
50+
<jackson.version>2.9.3</jackson.version>
5151

5252
<!-- Define which version of junit you'll be running -->
5353
<junit.version>4.12</junit.version>
@@ -58,7 +58,7 @@
5858
<checkstyle.version>8.0</checkstyle.version>
5959

6060
<!-- Log4J Version -->
61-
<log4j2.version>2.1</log4j2.version>
61+
<log4j2.version>2.8.2</log4j2.version>
6262

6363
<!-- test toggling -->
6464
<skipTests>false</skipTests>
@@ -75,7 +75,7 @@
7575
<dependency>
7676
<groupId>org.apache.httpcomponents</groupId>
7777
<artifactId>httpclient</artifactId>
78-
<version>4.5.3</version>
78+
<version>4.5.4</version>
7979
</dependency>
8080

8181
<!-- For parsing XML responses to POJOs -->
@@ -130,7 +130,7 @@
130130
<dependency>
131131
<groupId>com.tngtech.java</groupId>
132132
<artifactId>junit-dataprovider</artifactId>
133-
<version>1.12.0</version>
133+
<version>1.13.1</version>
134134
<scope>test</scope>
135135
</dependency>
136136

@@ -146,7 +146,7 @@
146146
<dependency>
147147
<groupId>commons-io</groupId>
148148
<artifactId>commons-io</artifactId>
149-
<version>2.5</version>
149+
<version>2.6</version>
150150
<scope>test</scope>
151151
</dependency>
152152
</dependencies>
@@ -219,6 +219,35 @@
219219
</executions>
220220
</plugin>
221221

222+
<!-- License Auditing -->
223+
<plugin>
224+
<groupId>com.mycila</groupId>
225+
<artifactId>license-maven-plugin</artifactId>
226+
<version>3.0</version>
227+
<configuration>
228+
<header>LICENSE.txt</header>
229+
<excludes>
230+
<exclude>**/.md</exclude>
231+
<exclude>**/.bak</exclude>
232+
<exclude>**.yml</exclude>
233+
<exclude>**.yaml</exclude>
234+
<exclude>**.xml</exclude>
235+
<exclude>build/**</exclude>
236+
<exclude>src/test/resources/**</exclude>
237+
<exclude>src/main/resources/**</exclude>
238+
<exclude>LICENSE.txt</exclude>
239+
</excludes>
240+
</configuration>
241+
<executions>
242+
<execution>
243+
<phase>compile</phase>
244+
<goals>
245+
<goal>check</goal>
246+
</goals>
247+
</execution>
248+
</executions>
249+
</plugin>
250+
222251
<!-- Release plugin -->
223252
<plugin>
224253
<groupId>org.sonatype.plugins</groupId>
@@ -248,35 +277,6 @@
248277
</dependency>
249278
</dependencies>
250279
</plugin>
251-
252-
<!-- License Auditing -->
253-
<plugin>
254-
<groupId>com.mycila</groupId>
255-
<artifactId>license-maven-plugin</artifactId>
256-
<version>3.0</version>
257-
<configuration>
258-
<header>LICENSE.txt</header>
259-
<excludes>
260-
<exclude>**/.md</exclude>
261-
<exclude>**/.bak</exclude>
262-
<exclude>**.yml</exclude>
263-
<exclude>**.yaml</exclude>
264-
<exclude>**.xml</exclude>
265-
<exclude>build/**</exclude>
266-
<exclude>src/test/resources/**</exclude>
267-
<exclude>src/main/resources/**</exclude>
268-
<exclude>LICENSE.txt</exclude>
269-
</excludes>
270-
</configuration>
271-
<executions>
272-
<execution>
273-
<phase>compile</phase>
274-
<goals>
275-
<goal>check</goal>
276-
</goals>
277-
</execution>
278-
</executions>
279-
</plugin>
280280
</plugins>
281281
</pluginManagement>
282282
</build>

src/main/java/com/darksci/pardot/api/InvalidRequestException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ public InvalidRequestException(final String message, final Throwable cause) {
3232
super(message, cause);
3333
this.errorCode = -1;
3434
}
35+
36+
public int getErrorCode() {
37+
return errorCode;
38+
}
3539
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright 2017 Stephen Powis https://github.com/Crim/pardot-java-client
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
5+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
6+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
7+
* persons to whom the Software is furnished to do so, subject to the following conditions:
8+
*
9+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
10+
* Software.
11+
*
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
13+
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
14+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
15+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16+
*/
17+
18+
package com.darksci.pardot.api;
19+
20+
/**
21+
* Thrown if the Client is unable to login or authenticate properly.
22+
*/
23+
public class LoginFailedException extends InvalidRequestException {
24+
25+
public LoginFailedException(final String message, final int errorCode) {
26+
super(message, errorCode);
27+
}
28+
29+
public LoginFailedException(final String message, final int errorCode, final Throwable cause) {
30+
super(message, errorCode);
31+
this.initCause(cause);
32+
}
33+
}

0 commit comments

Comments
 (0)