Skip to content

Commit 30b248a

Browse files
committed
Initial commit
0 parents  commit 30b248a

54 files changed

Lines changed: 4491 additions & 0 deletions

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+
.git/
2+
.idea/
3+
**/target/
4+
**/*.iml

LICENSE.txt

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
WORK IN PROGRESS
2+
3+
Java implementation of the [documented](https://myanimelist.net/modules.php?go=api) and undocumented API of [MyAnimeList](https://myanimelist.net/).

pom.xml

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
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>net.beardbot</groupId>
8+
<artifactId>mal-api</artifactId>
9+
<version>1.0.0-SNAPSHOT</version>
10+
11+
<name>${project.groupId}:${project.artifactId}</name>
12+
<description>Java binding for the official MyAnimeList API</description>
13+
<url>https://github.com/calne-ca/mal-api-java</url>
14+
15+
<developers>
16+
<developer>
17+
<name>Joscha Düringer</name>
18+
<email>joscha.dueringer@beardbot.net</email>
19+
</developer>
20+
</developers>
21+
22+
<licenses>
23+
<license>
24+
<name>GNU General Public License, version 3</name>
25+
<url>http://www.gnu.org/licenses/gpl-3.0.html</url>
26+
</license>
27+
</licenses>
28+
29+
<scm>
30+
<connection>scm:git:https://github.com/calne-ca/mal-api-java.git</connection>
31+
<developerConnection>scm:git:https://github.com/calne-ca/mal-api-java.git</developerConnection>
32+
<url>https://github.com/calne-ca/mal-api-java</url>
33+
</scm>
34+
35+
<properties>
36+
<project.java.version>1.8</project.java.version>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
39+
40+
<inceptionYear>2018</inceptionYear>
41+
<maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
42+
<currentYear>${maven.build.timestamp}</currentYear>
43+
<author>Joscha Düringer</author>
44+
45+
<slf4j.version>1.7.25</slf4j.version>
46+
<jersey.version>2.27</jersey.version>
47+
<apache.commons.lang.version>3.0</apache.commons.lang.version>
48+
<apache.commons.io.version>2.5</apache.commons.io.version>
49+
<lombok.version>1.16.20</lombok.version>
50+
<wiremock.version>1.57</wiremock.version>
51+
<hamcrest.version>1.3</hamcrest.version>
52+
<junit.version>4.12</junit.version>
53+
<mockito.version>1.10.19</mockito.version>
54+
<freeportfinder.version>1.0</freeportfinder.version>
55+
56+
<gpg.plugin.version>1.5</gpg.plugin.version>
57+
<nexus.staging.plugin.version>1.6.8</nexus.staging.plugin.version>
58+
<compiler.plugin.version>3.7.0</compiler.plugin.version>
59+
<resources.plugin.version>3.0.2</resources.plugin.version>
60+
<source.plugin.version>3.0.1</source.plugin.version>
61+
<javadoc.plugin.version>3.0.0</javadoc.plugin.version>
62+
<license.plugin.version>3.0</license.plugin.version>
63+
</properties>
64+
65+
<distributionManagement>
66+
<snapshotRepository>
67+
<id>ossrh</id>
68+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
69+
</snapshotRepository>
70+
</distributionManagement>
71+
72+
<dependencies>
73+
<dependency>
74+
<groupId>org.glassfish.jersey.core</groupId>
75+
<artifactId>jersey-common</artifactId>
76+
<version>${jersey.version}</version>
77+
</dependency>
78+
<dependency>
79+
<groupId>org.glassfish.jersey.inject</groupId>
80+
<artifactId>jersey-hk2</artifactId>
81+
<version>${jersey.version}</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.glassfish.jersey.connectors</groupId>
85+
<artifactId>jersey-apache-connector</artifactId>
86+
<version>${jersey.version}</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>org.glassfish.jersey.core</groupId>
90+
<artifactId>jersey-client</artifactId>
91+
<version>${jersey.version}</version>
92+
</dependency>
93+
<dependency>
94+
<groupId>org.glassfish.jersey.media</groupId>
95+
<artifactId>jersey-media-moxy</artifactId>
96+
<version>${jersey.version}</version>
97+
</dependency>
98+
<dependency>
99+
<groupId>org.glassfish.jersey.media</groupId>
100+
<artifactId>jersey-media-jaxb</artifactId>
101+
<version>${jersey.version}</version>
102+
</dependency>
103+
<dependency>
104+
<groupId>org.apache.commons</groupId>
105+
<artifactId>commons-lang3</artifactId>
106+
<version>${apache.commons.lang.version}</version>
107+
</dependency>
108+
<dependency>
109+
<groupId>commons-io</groupId>
110+
<artifactId>commons-io</artifactId>
111+
<version>${apache.commons.io.version}</version>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.slf4j</groupId>
115+
<artifactId>slf4j-api</artifactId>
116+
<version>${slf4j.version}</version>
117+
</dependency>
118+
<dependency>
119+
<groupId>org.slf4j</groupId>
120+
<artifactId>slf4j-simple</artifactId>
121+
<version>${slf4j.version}</version>
122+
</dependency>
123+
<dependency>
124+
<groupId>org.projectlombok</groupId>
125+
<artifactId>lombok</artifactId>
126+
<version>${lombok.version}</version>
127+
</dependency>
128+
<dependency>
129+
<groupId>com.github.tomakehurst</groupId>
130+
<artifactId>wiremock</artifactId>
131+
<version>${wiremock.version}</version>
132+
<scope>test</scope>
133+
</dependency>
134+
<dependency>
135+
<groupId>org.hamcrest</groupId>
136+
<artifactId>hamcrest-all</artifactId>
137+
<version>${hamcrest.version}</version>
138+
<scope>test</scope>
139+
</dependency>
140+
<dependency>
141+
<groupId>org.mockito</groupId>
142+
<artifactId>mockito-core</artifactId>
143+
<version>${mockito.version}</version>
144+
<scope>test</scope>
145+
</dependency>
146+
<dependency>
147+
<groupId>junit</groupId>
148+
<artifactId>junit</artifactId>
149+
<version>${junit.version}</version>
150+
<scope>test</scope>
151+
</dependency>
152+
<dependency>
153+
<groupId>me.alexpanov</groupId>
154+
<artifactId>free-port-finder</artifactId>
155+
<version>${freeportfinder.version}</version>
156+
<scope>test</scope>
157+
</dependency>
158+
</dependencies>
159+
160+
<build>
161+
<plugins>
162+
<plugin>
163+
<groupId>org.apache.maven.plugins</groupId>
164+
<artifactId>maven-gpg-plugin</artifactId>
165+
<version>${gpg.plugin.version}</version>
166+
<executions>
167+
<execution>
168+
<id>sign-artifacts</id>
169+
<phase>verify</phase>
170+
<goals>
171+
<goal>sign</goal>
172+
</goals>
173+
</execution>
174+
</executions>
175+
</plugin>
176+
<plugin>
177+
<groupId>org.sonatype.plugins</groupId>
178+
<artifactId>nexus-staging-maven-plugin</artifactId>
179+
<version>${nexus.staging.plugin.version}</version>
180+
<extensions>true</extensions>
181+
<configuration>
182+
<serverId>ossrh</serverId>
183+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
184+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
185+
</configuration>
186+
</plugin>
187+
<plugin>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-compiler-plugin</artifactId>
190+
<version>${compiler.plugin.version}</version>
191+
<configuration>
192+
<source>${project.java.version}</source>
193+
<target>${project.java.version}</target>
194+
<encoding>${project.build.sourceEncoding}</encoding>
195+
</configuration>
196+
</plugin>
197+
<plugin>
198+
<groupId>org.apache.maven.plugins</groupId>
199+
<artifactId>maven-resources-plugin</artifactId>
200+
<version>${resources.plugin.version}</version>
201+
<configuration>
202+
<encoding>${project.build.outputEncoding}</encoding>
203+
</configuration>
204+
</plugin>
205+
<plugin>
206+
<artifactId>maven-assembly-plugin</artifactId>
207+
<configuration>
208+
<descriptorRefs>
209+
<descriptorRef>jar-with-dependencies</descriptorRef>
210+
</descriptorRefs>
211+
</configuration>
212+
</plugin>
213+
<plugin>
214+
<groupId>org.apache.maven.plugins</groupId>
215+
<artifactId>maven-source-plugin</artifactId>
216+
<version>${source.plugin.version}</version>
217+
<executions>
218+
<execution>
219+
<id>attach-sources</id>
220+
<goals>
221+
<goal>jar</goal>
222+
</goals>
223+
</execution>
224+
</executions>
225+
</plugin>
226+
<plugin>
227+
<groupId>org.apache.maven.plugins</groupId>
228+
<artifactId>maven-javadoc-plugin</artifactId>
229+
<version>${javadoc.plugin.version}</version>
230+
<executions>
231+
<execution>
232+
<id>attach-javadocs</id>
233+
<goals>
234+
<goal>jar</goal>
235+
</goals>
236+
</execution>
237+
</executions>
238+
</plugin>
239+
<plugin>
240+
<groupId>com.mycila</groupId>
241+
<artifactId>license-maven-plugin</artifactId>
242+
<version>${license.plugin.version}</version>
243+
<configuration>
244+
<header>templates/license_header.txt</header>
245+
<properties>
246+
<inceptionYear>${inceptionYear}</inceptionYear>
247+
<latestYearOfContribution>${currentYear}</latestYearOfContribution>
248+
<organization>${author}</organization>
249+
</properties>
250+
<includes>
251+
<include>src/**/*.java</include>
252+
<include>src/**/*.xml</include>
253+
</includes>
254+
<excludes>
255+
<exclude>**/src/test/resources/**</exclude>
256+
<exclude>**/src/test/out/**</exclude>
257+
</excludes>
258+
</configuration>
259+
<executions>
260+
<execution>
261+
<id>check-license</id>
262+
<phase>initialize</phase>
263+
<goals>
264+
<goal>check</goal>
265+
</goals>
266+
</execution>
267+
</executions>
268+
</plugin>
269+
</plugins>
270+
</build>
271+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* Copyright (C) 2018 Joscha Düringer
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
package net.beardbot.myanimelist;
18+
19+
class MAL {
20+
static final String MAL_URI = "https://myanimelist.net";
21+
22+
static final String PATH_ANIME_SEARCH = "/api/anime/search.xml";
23+
static final String PATH_ANIME_ADD = "/api/animelist/add/%id.xml";
24+
static final String PATH_ANIME_UPDATE = "/api/animelist/update/%id.xml";
25+
static final String PATH_ANIME_DELETE = "/api/animelist/delete/%id.xml";
26+
27+
static final String PATH_MANGA_SEARCH = "/api/manga/search.xml";
28+
static final String PATH_MANGA_ADD = "/api/mangalist/add/%id.xml";
29+
static final String PATH_MANGA_UPDATE = "/api/mangalist/update/%id.xml";
30+
static final String PATH_MANGA_DELETE = "/api/mangalist/delete/%id.xml";
31+
32+
static final String PATH_VERIFY_CREDENTIALS = "/api/account/verify_credentials.xml";
33+
34+
static final String PATH_MALAPPINFO = "/malappinfo.php";
35+
}

0 commit comments

Comments
 (0)