Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
I swear today i will finish this shiz
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsdayrs committed May 25, 2019
1 parent 86cc8bb commit 1613977
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.Doomsdayrs.Jikan4java.core.Retriever;
import com.github.Doomsdayrs.Jikan4java.enums.SortBy;
import com.github.Doomsdayrs.Jikan4java.enums.search.animeManga.orderBy.OrderBy;
import com.github.Doomsdayrs.Jikan4java.enums.status.Stati;
import com.github.Doomsdayrs.Jikan4java.enums.user.userListings.filters.UserListFilters;
import com.github.Doomsdayrs.Jikan4java.enums.user.userListings.orderBy.ListOrderBy;
import com.github.Doomsdayrs.Jikan4java.types.Main.User.Listing.AnimeList.AnimeList;
import com.github.Doomsdayrs.Jikan4java.types.Main.User.Listing.MangaList.MangaList;
import okhttp3.OkHttpClient;
Expand Down Expand Up @@ -66,8 +66,8 @@ public UserListingSearch(Request.Builder builder, String username) {
protected int page = 0;
protected SortBy sortBy = null;

protected OrderBy orderBy = null;
protected OrderBy orderBy2 = null;
protected ListOrderBy orderBy = null;
protected ListOrderBy orderBy2 = null;

protected int[] from = null;
protected int[] to = null;
Expand All @@ -91,12 +91,12 @@ public UserListingSearch setSortBy(SortBy sortBy) {
return this;
}

public UserListingSearch setOrderBy(OrderBy orderBy) {
public UserListingSearch setOrderBy(ListOrderBy orderBy) {
this.orderBy = orderBy;
return this;
}

public UserListingSearch setOrderBy2(OrderBy orderBy2) {
public UserListingSearch setOrderBy2(ListOrderBy orderBy2) {
this.orderBy2 = orderBy2;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.github.Doomsdayrs.Jikan4java.enums.user.userListings.orderBy;

/**
* This file is part of Jikan4java.
* Jikan4java is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Jikan4java. If not, see https://www.gnu.org/licenses/.
* ====================================================================
* Jikan4java
* 25 / 05 / 2019
*
* @author github.com/doomsdayrs
*/
public enum AnimeListOrderBy implements ListOrderBy {
TITLE("title"),
START_DATE("start_date"),
END_DATE("end_date"),
SCORE("score"),
TYPE("type"),
MEMBERS("members"),
ID("id"),
EPISODES("episodes"),
RATING("rating");

private final String type;

AnimeListOrderBy(String type) {
this.type = type;
}

@Override
public String toString() {
return type;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.github.Doomsdayrs.Jikan4java.enums.user.userListings.orderBy;

/**
* This file is part of Jikan4java.
* Jikan4java is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Jikan4java. If not, see https://www.gnu.org/licenses/.
* ====================================================================
* Jikan4java
* 25 / 05 / 2019
*
* @author github.com/doomsdayrs
*/
public interface ListOrderBy {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.github.Doomsdayrs.Jikan4java.enums.user.userListings.orderBy;

/**
* This file is part of Jikan4java.
* Jikan4java is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Jikan4java. If not, see https://www.gnu.org/licenses/.
* ====================================================================
* Jikan4java
* 25 / 05 / 2019
*
* @author github.com/doomsdayrs
*/
public enum MangaListOrderBy {
TITLE("title"),
START_DATE("start_date"),
END_DATE("end_date"),
SCORE("score"),
TYPE("type"),
MEMBERS("members"),
ID("id"),
CHAPTERS("chapters"),
VOLUMES("volumes");

private final String type;

MangaListOrderBy(String type) {
this.type = type;
}

@Override
public String toString() {
return type;
}
}

0 comments on commit 1613977

Please sign in to comment.