Git Product home page Git Product logo

javashiki's Introduction

javashiki

Implementation shikimori api (https://shikimori.one/api/doc) for Java.

Dependency

To use this library you need to add current repository to your project (example in maven):

<dependencies>
  <dependency>
    <groupId>com.yauhescha</groupId>
    <artifactId>javashiki</artifactId>
    <version>2.2.0</version>
  </dependency>
</dependencies>

Also you need to add library in dependencies:

<repositories>
  <repository>
    <id>javashiki-mvn-repo</id>
    <url>https://raw.github.com/Yauhescha/javashiki/mvn-repo/</url>
    <snapshots>
      <enabled>true</enabled>
      <updatePolicy>always</updatePolicy>
    </snapshots>
  </repository>
</repositories>

Example

AuthShikimori auth = new AuthShikimori(applicationName, applicationClientId, applicationClientSecret, applicationRedirectUri);
// or = new AuthShikimori(); to use Api Test application
String linkToAuthorizationCode = auth.getUrlToAuthorizationCode(); // use this to get authorization code
auth.authorize(scanner.nextLine());

UserInfo userInfo = auth.getUserApi().whoIAm();
System.out.printf(userInfo.toString());


AnimeApi animeApi = auth.getAnimeApi();
AnimeSearchParameters parameters = AnimeSearchParameters
        .builder()
        .limit(5)
        .search("naruto")
        .build();
List<Anime> animes = animeApi.getAnimes(parameters);
animes.forEach(anime -> System.out.println("Anime with name '" + anime.getName() + "' has '" + anime.getEpisodes() + "' episodes"));

Implemented methods from Shikimori API

Achievements

  • GET /api/achievements

Appear

  • POST /api/appears

Animes

  • GET /api/animes
  • GET /api/animes/:id
  • GET /api/animes/:id/roles
  • GET /api/animes/:id/similar
  • GET /api/animes/:id/related
  • GET /api/animes/:id/screenshots
  • GET /api/animes/:id/franchise
  • GET /api/animes/:id/external_links
  • GET /api/animes/:id/topics

Bans

  • GET /api/bans

Calendars

  • GET /api/calendar

Characters

  • GET /api/characters/:id
  • GET /api/characters/search

Constants

  • GET /api/constants/anime
  • GET /api/constants/manga
  • GET /api/constants/user_rate
  • GET /api/constants/club
  • GET /api/constants/smileys

Genres

  • GET /api/genres

Forums

  • GET /api/forums

Stats

  • GET /api/stats/active_users

Studios

  • GET /api/studios

Publishers

  • GET /api/publishers

User images

  • POST /api/user_images

People

  • GET /api/people/:id
  • GET /api/people/search

Mangas

  • GET /api/mangas
  • GET /api/mangas/:id
  • GET /api/mangas/:id/roles
  • GET /api/mangas/:id/similar
  • GET /api/mangas/:id/related
  • GET /api/mangas/:id/franchise
  • GET /api/mangas/:id/external_links
  • GET /api/mangas/:id/topics

Users

  • GET /api/users
  • GET /api/users/:id
  • GET /api/users/:id/info
  • GET /api/users/whoami
  • GET /api/users/:id/friends
  • GET /api/users/:id/clubs
  • GET /api/users/:id/anime_rates
  • GET /api/users/:id/manga_rates
  • GET /api/users/:id/favourites
  • GET /api/users/:id/messages
  • GET /api/users/:id/unread_messages
  • GET /api/users/:id/history
  • GET /api/users/:id/bans

NOT Implemented methods from Shikimori API yet

User rates

  • DELETE /api/user_rates/:type/cleanup
  • DELETE /api/user_rates/:type/reset

Clubs

  • GET /api/clubs
  • PATCH /api/clubs/:id
  • PUT /api/clubs/:id
  • GET /api/clubs/:id
  • GET /api/clubs/:id/animes
  • GET /api/clubs/:id/mangas
  • GET /api/clubs/:id/ranobe
  • GET /api/clubs/:id/characters
  • GET /api/clubs/:id/members
  • GET /api/clubs/:id/images
  • POST /api/clubs/:id/join
  • POST /api/clubs/:id/leave

Comments

  • GET /api/comments/:id
  • GET /api/comments
  • POST /api/comments
  • PATCH /api/comments/:id
  • PUT /api/comments/:id
  • DELETE /api/comments/:id

Dialogs

  • GET /api/dialogs
  • GET /api/dialogs/:id
  • DELETE /api/dialogs/:id

Favorites

  • POST /api/favorites/:linked_type/:linked_id(/:kind)
  • DELETE /api/favorites/:linked_type/:linked_id
  • POST /api/favorites/:id/reorder

Friends

  • POST /api/friends/:id
  • DELETE /api/friends/:id

Messages

  • GET /api/messages/:id
  • POST /api/messages
  • PATCH /api/messages/:id
  • PUT /api/messages/:id
  • DELETE /api/messages/:id
  • POST /api/messages/mark_read
  • POST /api/messages/read_all
  • POST /api/messages/delete_all

Ranobe

  • GET /api/ranobe
  • GET /api/ranobe/:id
  • GET /api/ranobe/:id/roles
  • GET /api/ranobe/:id/similar
  • GET /api/ranobe/:id/related
  • GET /api/ranobe/:id/franchise
  • GET /api/ranobe/:id/external_links
  • GET /api/ranobe/:id/topics

Styles

  • GET /api/styles/:id
  • POST /api/styles/preview
  • POST /api/styles
  • PATCH /api/styles/:id
  • PUT /api/styles/:id

Topics

  • GET /api/topics
  • GET /api/topics/updates
  • GET /api/topics/hot
  • GET /api/topics/:id
  • POST /api/topics
  • PATCH /api/topics/:id
  • PUT /api/topics/:id
  • DELETE /api/topics/:id

Videos

  • GET /api/animes/:anime_id/videos
  • POST /api/animes/:anime_id/videos
  • DELETE /api/animes/:anime_id/videos/:id

javashiki's People

Contributors

yauhescha avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.