Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Commit 86ba33e

Browse files
committed
Implementation of Twitter Ads REST API v0 (compatible with Java7)
1 parent 1cde602 commit 86ba33e

File tree

415 files changed

+58668
-2229
lines changed

Some content is hidden

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

415 files changed

+58668
-2229
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.classpath
1+
asspath
22
.project
33
.settings
44
.DS_Store
@@ -12,4 +12,4 @@ spring-social-core/src/test/java/exploration
1212
**/.settings
1313
**/bin
1414
/.idea
15-
*.iml
15+
*.iml

alerts.txt

Whitespace-only changes.

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ project('spring-social-twitter') {
197197
compile ("org.springframework.social:spring-social-security:$springSocialVersion", optional)
198198
compile ("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
199199
compile ("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
200-
compile ("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
201200
compile ("org.springframework.security:spring-security-crypto:$springSecurityCryptoVersion")
202201
compile ("javax.servlet:javax.servlet-api:$servletApiVersion", provided)
203202
testCompile ("org.springframework:spring-test:$springVersion")

docs/manual/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

report.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<dfxml xmloutputversion='1.0'>
3+
<metadata
4+
xmlns='http://afflib.org/tcpflow/'
5+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
6+
xmlns:dc='http://purl.org/dc/elements/1.1/'>
7+
<dc:type>Feature Extraction</dc:type>
8+
</metadata>
9+
<creator version='1.0'>
10+
<program>TCPFLOW</program>
11+
<version>1.4.4</version>
12+
<build_environment>
13+
<compiler>4.8.2 (4.8.2 20140110 (prerelease) [ibm/gcc-4_8-branch merged from gcc-4_8-branch, revision 205847])</compiler>
14+
<CPPFLAGS>-pthread -I/usr/local/include -D_FORTIFY_SOURCE=2 -DUTC_OFFSET=+0000 </CPPFLAGS>
15+
<CFLAGS>-g -pthread -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -MD -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wwrite-strings -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wdisabled-optimization -Wfloat-equal -Wmultichar -Wc++-compat -Wmissing-noreturn -Wall -Wstrict-prototypes</CFLAGS>
16+
<CXXFLAGS>-g -pthread -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -std=c++11 -Wall -MD -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wshadow -Wwrite-strings -Wcast-align -Wredundant-decls -Wdisabled-optimization -Wfloat-equal -Wmultichar -Wmissing-noreturn -Woverloaded-virtual -Wsign-promo -funit-at-a-time -Wstrict-null-sentinel -Weffc++ </CXXFLAGS>
17+
<LDFLAGS>-L/usr/local/lib -Wl,-Bsymbolic-functions -Wl,-z,relro</LDFLAGS>
18+
<LIBS>-lpcap -lcairo -lfontconfig -lfreetype -lpixman-1 -lexpat -lssl -lcrypto -lz -lssl -lcrypto </LIBS>
19+
<compilation_date>2014-01-13T17:14:40</compilation_date>
20+
<library name="boost" version="105400"/>
21+
</build_environment>
22+
<execution_environment>
23+
<os_sysname>Linux</os_sysname>
24+
<os_release>3.13.0-55-generic</os_release>
25+
<os_version>#94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015</os_version>
26+
<host>oohm-bdev-02</host>
27+
<arch>x86_64</arch>
28+
<command_line>tcpflow -i any -C -J port 9003</command_line>
29+
<uid>0</uid>
30+
<start_time>2015-07-23T09:56:11Z</start_time>
31+
</execution_environment>
32+
</creator>
33+
<configuration>
34+
</configuration>
35+
<tdelta>0</tdelta>
36+
<configuration>
37+
<fileobject>
38+
<filesize>0</filesize>
39+
<tcpflow startime='2015-07-23T02:56:30.340759Z' endtime='2015-07-23T02:56:30.340923Z' src_ipn='127.0.0.1' dst_ipn='127.0.0.1' mac_daddr='00:00:03:04:00:06' packets='2' srcport='9003' dstport='43928' family='2' />
40+
</fileobject>
41+
<fileobject>
42+
<filesize>0</filesize>
43+
<tcpflow startime='2015-07-23T02:56:30.340741Z' endtime='2015-07-23T02:56:30.390974Z' src_ipn='127.0.0.1' dst_ipn='127.0.0.1' mac_daddr='00:00:03:04:00:06' packets='4' srcport='43928' dstport='9003' family='2' />
44+
</fileobject>

spring-social-twitter/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

spring-social-twitter/src/main/java/org/springframework/social/twitter/api/AbstractStreamParameters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Subclassed by {@link UserStreamParameters} and {@link FilterStreamParameters}.
2424
* @author Craig Walls
2525
*/
26-
abstract class AbstractStreamParameters {
26+
public abstract class AbstractStreamParameters {
2727

2828
protected StringBuffer track = new StringBuffer();
2929

spring-social-twitter/src/main/java/org/springframework/social/twitter/api/AccountSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @author Craig Walls
2323
*/
2424
public class AccountSettings extends TwitterObject {
25-
25+
private static final long serialVersionUID = 1L;
2626
private boolean alwaysUseHttps;
2727
private boolean discoverableByEmail;
2828
private boolean discoverableByMobilePhone;

spring-social-twitter/src/main/java/org/springframework/social/twitter/api/DirectMessage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @author Craig Walls
2323
*/
2424
public class DirectMessage extends TwitterObject {
25+
private static final long serialVersionUID = 1L;
2526
private final long id;
2627
private final String text;
2728
private final TwitterProfile sender;

spring-social-twitter/src/main/java/org/springframework/social/twitter/api/MediaEntity.java

Lines changed: 108 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,134 +19,144 @@
1919
import java.util.Arrays;
2020

2121
/**
22-
* <p>A representation of embedded media entity.</p>
22+
* <p>
23+
* A representation of embedded media entity.
24+
* </p>
25+
*
2326
* @author bowen
2427
*/
2528
public class MediaEntity extends TwitterObject implements Serializable {
2629

27-
private static final long serialVersionUID = 1L;
30+
private static final long serialVersionUID = 1L;
31+
32+
private final long id;
33+
34+
private final String mediaHttp;
35+
36+
private final String mediaHttps;
37+
38+
private final String url;
39+
40+
private final String display;
2841

29-
private long id;
42+
private final String expanded;
3043

31-
private String mediaHttp;
44+
private final String type;
3245

33-
private String mediaHttps;
46+
private final int[] indices;
3447

35-
private String url;
48+
private final VideoInfoMediaEntity videoInfo;
3649

37-
private String display;
50+
public MediaEntity(
51+
long id,
52+
String mediaHttp,
53+
String mediaHttps,
54+
String url,
55+
String display,
56+
String expanded,
57+
String type,
58+
int[] indices,
59+
VideoInfoMediaEntity videoInfo) {
3860

39-
private String expanded;
61+
this.id = id;
62+
this.mediaHttp = mediaHttp;
63+
this.mediaHttps = mediaHttps;
64+
this.url = url;
65+
this.display = display;
66+
this.expanded = expanded;
67+
this.type = type;
68+
this.indices = indices;
69+
this.videoInfo = videoInfo;
70+
}
4071

41-
private String type;
4272

43-
private int[] indices;
73+
public long getId() {
74+
return id;
75+
}
4476

45-
public MediaEntity(long id, String mediaHttp, String mediaHttps, String url, String display, String expanded, String type, int[] indices) {
46-
this.id = id;
47-
this.mediaHttp = mediaHttp;
48-
this.mediaHttps = mediaHttps;
49-
this.url = url;
50-
this.display = display;
51-
this.expanded = expanded;
52-
this.type = type;
53-
this.indices = indices;
54-
}
5577

78+
public String getMediaUrl() {
79+
return mediaHttp;
80+
}
5681

57-
public long getId() {
58-
return this.id;
59-
}
6082

83+
public String getMediaSecureUrl() {
84+
return mediaHttps;
85+
}
6186

62-
public String getMediaUrl() {
63-
return this.mediaHttp;
64-
}
6587

88+
public String getType() {
89+
return type;
90+
}
6691

67-
public String getMediaSecureUrl() {
68-
return this.mediaHttps;
69-
}
7092

93+
public String getDisplayUrl() {
94+
return display;
95+
}
7196

72-
public String getType() {
73-
return this.type;
74-
}
7597

98+
public String getExpandedUrl() {
99+
return expanded;
100+
}
76101

77-
public String getDisplayUrl() {
78-
return display;
79-
}
80102

103+
public String getUrl() {
104+
return url;
105+
}
81106

82-
public String getExpandedUrl() {
83-
return this.expanded;
84-
}
85107

108+
public int[] getIndices() {
109+
if (indices == null || indices.length <= 0)
110+
return new int[0];
111+
return indices;
112+
}
86113

87-
public String getUrl() {
88-
return this.url;
89-
}
90114

115+
public VideoInfoMediaEntity getVideoInfo() {
116+
return videoInfo;
117+
}
91118

92-
public int[] getIndices() {
93-
if (this.indices == null || this.indices.length <= 0) {
94-
return new int[0];
95-
}
96-
return this.indices;
97-
}
98119

120+
@Override
121+
public boolean equals(Object o) {
122+
if (this == o)
123+
return true;
124+
if (o == null || getClass() != o.getClass())
125+
return false;
99126

100-
@Override
101-
public boolean equals(Object o) {
102-
if (this == o) {
103-
return true;
104-
}
105-
if (o == null || getClass() != o.getClass()) {
106-
return false;
107-
}
127+
final MediaEntity that = (MediaEntity) o;
108128

109-
MediaEntity that = (MediaEntity) o;
129+
if (id != that.id)
130+
return false;
131+
if (display != null ? !display.equals(that.display) : that.display != null)
132+
return false;
133+
if (expanded != null ? !expanded.equals(that.expanded) : that.expanded != null)
134+
return false;
135+
if (!Arrays.equals(indices, that.indices))
136+
return false;
137+
if (mediaHttp != null ? !mediaHttp.equals(that.mediaHttp) : that.mediaHttp != null)
138+
return false;
139+
if (mediaHttps != null ? !mediaHttps.equals(that.mediaHttps) : that.mediaHttps != null)
140+
return false;
141+
if (type != null ? !type.equals(that.type) : that.type != null)
142+
return false;
143+
if (url != null ? !url.equals(that.url) : that.url != null)
144+
return false;
110145

111-
if (id != that.id) {
112-
return false;
113-
}
114-
if (display != null ? !display.equals(that.display) : that.display != null) {
115-
return false;
116-
}
117-
if (expanded != null ? !expanded.equals(that.expanded) : that.expanded != null) {
118-
return false;
119-
}
120-
if (!Arrays.equals(indices, that.indices)) {
121-
return false;
122-
}
123-
if (mediaHttp != null ? !mediaHttp.equals(that.mediaHttp) : that.mediaHttp != null) {
124-
return false;
125-
}
126-
if (mediaHttps != null ? !mediaHttps.equals(that.mediaHttps) : that.mediaHttps != null) {
127-
return false;
128-
}
129-
if (type != null ? !type.equals(that.type) : that.type != null) {
130-
return false;
131-
}
132-
if (url != null ? !url.equals(that.url) : that.url != null) {
133-
return false;
134-
}
135-
136-
return true;
137-
}
138-
139-
140-
@Override
141-
public int hashCode() {
142-
int result = (int) (id ^ (id >>> 32));
143-
result = 31 * result + (mediaHttp != null ? mediaHttp.hashCode() : 0);
144-
result = 31 * result + (mediaHttps != null ? mediaHttps.hashCode() : 0);
145-
result = 31 * result + (url != null ? url.hashCode() : 0);
146-
result = 31 * result + (display != null ? display.hashCode() : 0);
147-
result = 31 * result + (expanded != null ? expanded.hashCode() : 0);
148-
result = 31 * result + (type != null ? type.hashCode() : 0);
149-
result = 31 * result + (indices != null ? Arrays.hashCode(indices) : 0);
150-
return result;
151-
}
146+
return true;
147+
}
148+
149+
150+
@Override
151+
public int hashCode() {
152+
int result = (int) (id ^ (id >>> 32));
153+
result = 31 * result + (mediaHttp != null ? mediaHttp.hashCode() : 0);
154+
result = 31 * result + (mediaHttps != null ? mediaHttps.hashCode() : 0);
155+
result = 31 * result + (url != null ? url.hashCode() : 0);
156+
result = 31 * result + (display != null ? display.hashCode() : 0);
157+
result = 31 * result + (expanded != null ? expanded.hashCode() : 0);
158+
result = 31 * result + (type != null ? type.hashCode() : 0);
159+
result = 31 * result + (indices != null ? Arrays.hashCode(indices) : 0);
160+
return result;
161+
}
152162
}

0 commit comments

Comments
 (0)