Class JEdenManga


  • public class JEdenManga
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      JEdenManga()
      Initializes a new JEdenManga object.
    • Method Summary

      Modifier and Type Method Description
      MangaList getAllManga()
      Returns a complete list of manga, to avoid server load please try to use this only once or twice in a day.
      java.util.ArrayList<Page> getChapterPages​(ChapterInfo chapter)
      Returns an ArrayList containing chapter Pages from given ChapterInfo.
      java.util.ArrayList<Page> getChapterPages​(java.lang.String chapterId)
      Similar to getChapterPages(ChapterInfo), returns an ArrayList containing chapter Pages from given chapterId, you can get it from ChapterInfo.getId().
      MangaInfo getMangaInfo​(Manga manga)
      Returns all details about the provided Manga including description and chapter info.
      MangaInfo getMangaInfo​(java.lang.String mangaId)
      Similar to getMangaInfo(Manga), Returns all details about the provided mangaId got from Manga.getID() including description and chapter info.
      MangaList getMangaListSplited​(int page)
      Similar to getAllManga(), but returns a list of manga containing 500 entries(from manga X500 to (X+1)500, where X is the page argument) pagination is provided to maintain the list.
      MangaList getMangaListSplitedRange​(int page, int size)
      Similar to getMangaListSplited(int), but returns only Y manga’s informations (from manga XY to (X+1)Y) [25 < Y < 1500]
      If X is 0 and Y is 30, this will return first 30 list, if x is 1 and y is 30 this will return mangas 30 to 60 if x is 2 and y is 50 it will return mangas from the range 100 to 150 and so on x is the page value and y is the number of manga in the page.
      Status login​(java.lang.String userName, char[] password)
      Login user with mangaeden web site, the session is stored in a cookie but it will be cleared as soon as the application completely terminates.
      Status logout()
      To Logout user from mangaeden web site.
      java.util.List<MyManga> myManga()
      Returns a List of MyManga if the user is logged in, throws AccountAccessException if not.
      void setLanguage​(Language language)
      Set the Language for manga
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JEdenManga

        public JEdenManga()
        Initializes a new JEdenManga object. uses the same web session if connection is already made.
    • Method Detail

      • setLanguage

        public void setLanguage​(Language language)
        Set the Language for manga
        Parameters:
        language - Supports English and Italian
      • getAllManga

        public MangaList getAllManga()
                              throws java.io.IOException
        Returns a complete list of manga, to avoid server load please try to use this only once or twice in a day.
        Returns:
        MangaList
        Throws:
        java.io.IOException
      • getMangaListSplited

        public MangaList getMangaListSplited​(int page)
                                      throws java.io.IOException
        Similar to getAllManga(), but returns a list of manga containing 500 entries(from manga X500 to (X+1)500, where X is the page argument) pagination is provided to maintain the list.
        Parameters:
        page - page number in integer
        Returns:
        MangaList
        Throws:
        java.io.IOException
      • getMangaListSplitedRange

        public MangaList getMangaListSplitedRange​(int page,
                                                  int size)
                                           throws java.io.IOException
        Similar to getMangaListSplited(int), but returns only Y manga’s informations (from manga XY to (X+1)Y) [25 < Y < 1500]
        If X is 0 and Y is 30, this will return first 30 list, if x is 1 and y is 30 this will return mangas 30 to 60 if x is 2 and y is 50 it will return mangas from the range 100 to 150 and so on x is the page value and y is the number of manga in the page.
        Parameters:
        page - page number in integer
        size - size of each page in integer
        Returns:
        MangaList
        Throws:
        java.io.IOException
      • getMangaInfo

        public MangaInfo getMangaInfo​(Manga manga)
                               throws java.io.IOException
        Returns all details about the provided Manga including description and chapter info.
        Parameters:
        manga - Manga object got from MangaList.getMangas()
        Returns:
        MangaInfo
        Throws:
        java.io.IOException
      • getMangaInfo

        public MangaInfo getMangaInfo​(java.lang.String mangaId)
                               throws java.io.IOException
        Similar to getMangaInfo(Manga), Returns all details about the provided mangaId got from Manga.getID() including description and chapter info.
        Parameters:
        mangaId - a string mangaId got from Manga.getID()
        Returns:
        MangaInfo
        Throws:
        java.io.IOException
      • getChapterPages

        public java.util.ArrayList<Page> getChapterPages​(ChapterInfo chapter)
                                                  throws java.io.IOException
        Returns an ArrayList containing chapter Pages from given ChapterInfo.
        Parameters:
        chapter - ChapterInfo
        Throws:
        java.io.IOException
      • getChapterPages

        public java.util.ArrayList<Page> getChapterPages​(java.lang.String chapterId)
                                                  throws java.io.IOException
        Similar to getChapterPages(ChapterInfo), returns an ArrayList containing chapter Pages from given chapterId, you can get it from ChapterInfo.getId().
        Parameters:
        chapterId -
        Returns:
        List of Pages from chapter.
        Throws:
        java.io.IOException
      • login

        public Status login​(java.lang.String userName,
                            char[] password)
        Login user with mangaeden web site, the session is stored in a cookie but it will be cleared as soon as the application completely terminates. saving cookie is not supported yet.
        Parameters:
        userName - user name of user in string
        password - password of user in char array
        Returns:
        Status Status.OK if request succeeds and Status.ERROR when request fail.
      • myManga

        public java.util.List<MyManga> myManga()
        Returns a List of MyManga if the user is logged in, throws AccountAccessException if not.