Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

Anilistrb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Anilistrb

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Anilistrb

Gem Version Gem GitHub GitHub repo size in bytes

A simple API wrapper for AniList's GraphQL APIv2

This is a small side project for a practical introduction to both Ruby and GraphQL, so its not perfect

Also learned some of the basics of Rubocop, Rspec, Rake, Ruby metaprogramming, and publishing a ruby gem

Installation

  • https://rubygems.org/gems/Anilistrb
  • Put in gemfile: gem Anilistrb
  • Execute: bundle
  • or manually gem install Anilistrb
  • Update gem update Anilistrb

Usage

require 'Anilistrb/Client'

client = Anilistrb::Client.new
anime = client.search_anime('Konosuba')
puts anime
# [ANIME] 21202 - {
#  "romaji"=>"Kono Subarashii Sekai ni Shukufuku wo!", 
#  "english"=>"KONOSUBA -God's blessing on this wonderful world!",
#  "native"=>"この素晴らしい世界に祝福を!" }

p anime.attributes # ["id", "title", "type", "format", "status", "description", "start_date", "end_date", "season", ... ]

puts anime.data # Raw request data as a hash

user = client.search_user('barrettotte') 
puts user # [USER] 247578 - barrettotte

list = client.get_animelist(247578)
puts list
# ANIME list for [USER] 247578 - barrettotte
#       Completed: 244   item(s)
#       Current:   9     item(s)
#       Dropped:   1     item(s)
#       Paused:    0     item(s)
#       Planning:  284   item(s)
#       Repeating: 0     item(s)

API Wrapper - https://graphql.anilist.co

  • get_anime(id)
  • get_manga(id)
  • get_animelist(userId)
  • get_mangalist(userId)
  • search_anime(search)
  • search_manga(search)
  • search_anime_paged(search, perPage, page)
  • search_manga_paged(search, perPage, page)
  • search_user(search)
  • gql_request(query string, variables struct)

Development

  • bundle install to install dependencies
  • rake spec run tests
  • bundle exec rake install install locally

Building/Publishing

  • commit + push all changes
  • gem build Anilistrb.gemspec
  • gem push Anilistrb-x.x.x.gem

Sources

FAQs

Package last updated on 10 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc