Skip to content

Commit f145d51

Browse files
author
hyq
committed
first add
0 parents  commit f145d51

78 files changed

Lines changed: 5737 additions & 0 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target
2+
/*.iml
3+
.DS_Store
4+
/.idea

pom.xml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.weibo.ad.sdk</groupId>
8+
<artifactId>ads-sdk</artifactId>
9+
<version>1.0.0</version>
10+
11+
<properties>
12+
<project.sourceEncoding>UTF-8</project.sourceEncoding>
13+
<jdk.version>1.8</jdk.version>
14+
<maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
15+
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
16+
<okhttp3.version>3.6.0</okhttp3.version>
17+
<guava.version>21.0</guava.version>
18+
<fastjson.version>1.2.24</fastjson.version>
19+
<junit.version>4.12</junit.version>
20+
<easymock.version>3.4</easymock.version>
21+
<maven.compiler.source>1.8</maven.compiler.source>
22+
<maven.compiler.target>1.8</maven.compiler.target>
23+
</properties>
24+
25+
<dependencies>
26+
27+
<dependency>
28+
<groupId>com.google.guava</groupId>
29+
<artifactId>guava</artifactId>
30+
<version>${guava.version}</version>
31+
</dependency>
32+
33+
<!--接入java的ragnar-->
34+
<dependency>
35+
<groupId>com.weibo.ad.adinf</groupId>
36+
<artifactId>ragnar-java-sdk</artifactId>
37+
<version>1.0.5.20</version>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>com.squareup.okhttp3</groupId>
42+
<artifactId>okhttp</artifactId>
43+
<version>${okhttp3.version}</version>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>com.alibaba</groupId>
48+
<artifactId>fastjson</artifactId>
49+
<version>${fastjson.version}</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>junit</groupId>
53+
<artifactId>junit</artifactId>
54+
<version>${junit.version}</version>
55+
<scope>test</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.easymock</groupId>
59+
<artifactId>easymock</artifactId>
60+
<version>${easymock.version}</version>
61+
<scope>test</scope>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.apache.commons</groupId>
65+
<artifactId>commons-lang3</artifactId>
66+
<version>3.3.2</version>
67+
</dependency>
68+
</dependencies>
69+
70+
<build>
71+
<plugins>
72+
73+
<plugin>
74+
<groupId>org.springframework.boot</groupId>
75+
<artifactId>spring-boot-maven-plugin</artifactId>
76+
</plugin>
77+
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-source-plugin</artifactId>
81+
<version>${maven-source-plugin.version}</version>
82+
<configuration>
83+
<attach>true</attach>
84+
</configuration>
85+
<executions>
86+
<execution>
87+
<phase>compile</phase>
88+
<goals>
89+
<goal>jar</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
</plugin>
94+
95+
96+
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-archetype-plugin -->
97+
<plugin>
98+
<groupId>org.apache.maven.plugins</groupId>
99+
<artifactId>maven-archetype-plugin</artifactId>
100+
<version>2.2</version>
101+
</plugin>
102+
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-surefire-plugin</artifactId>
106+
<version>2.5</version>
107+
<configuration>
108+
<excludes>
109+
<exclude>**/*Constant.java</exclude>
110+
<exclude>**/*Exception.java</exclude>
111+
</excludes>
112+
</configuration>
113+
</plugin>
114+
115+
</plugins>
116+
</build>
117+
118+
</project>
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
package com.weibo.ad.sdk;
2+
3+
4+
5+
public class Api
6+
{
7+
public static final String API_VERSION = "v1.0.0";
8+
9+
private String token;
10+
11+
private String appId;
12+
13+
private String appSecret;
14+
15+
private ApiRequest apiRequest;
16+
17+
private Long customerId = 0L;
18+
19+
private Long operatorId = 0L;
20+
21+
private String ragnarName;
22+
23+
private String baseUrl;
24+
25+
26+
27+
28+
public Api(String appId, String appSecret, String token) {
29+
this.token = token;
30+
this.appId = appId;
31+
this.appSecret = appSecret;
32+
this.apiRequest = new ApiRequest(this);
33+
}
34+
35+
public void setRagnarName(String ragnarName){
36+
this.ragnarName = ragnarName;
37+
}
38+
39+
public String getRagnarName(){
40+
return ragnarName;
41+
}
42+
43+
44+
public static String getApiVersion() {
45+
return API_VERSION;
46+
}
47+
48+
public String getToken() {
49+
return token;
50+
}
51+
52+
public void setToken(String token) {
53+
this.token = token;
54+
}
55+
56+
public String getAppId() {
57+
return appId;
58+
}
59+
60+
public void setCustomerId(Long id) {
61+
this.customerId = id;
62+
}
63+
64+
public Long getCustomerId() {
65+
return this.customerId;
66+
}
67+
68+
public void setOperatorId (Long id) {
69+
this.operatorId = id;
70+
}
71+
72+
public Long getOperatorId() {
73+
return this.operatorId;
74+
}
75+
76+
public void setAppId(String appId) {
77+
this.appId = appId;
78+
}
79+
80+
public String getAppSecret() {
81+
return appSecret;
82+
}
83+
84+
public void setAppSecret(String appSecret) {
85+
this.appSecret = appSecret;
86+
}
87+
88+
public ApiRequest getApiRequest() {
89+
return apiRequest;
90+
}
91+
92+
public void setApiRequest(ApiRequest apiRequest) {
93+
this.apiRequest = apiRequest;
94+
}
95+
96+
public String getBaseUrl() {
97+
return baseUrl;
98+
}
99+
100+
public void setBaseUrl(String baseUrl) {
101+
this.baseUrl = baseUrl;
102+
}
103+
}

0 commit comments

Comments
 (0)