Sha256: 7060d02c2d1181c4ff3f713528396e43715c08c2f088f5ed48a15221a7abf915

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

require 'myanimelist/version'
require 'rest_client'
require 'active_support/core_ext/hash'
require 'myanimelist/anime'
require 'myanimelist/manga'
require 'myanimelist/credentials'

module MyAnimeList
  def self.configure(&block)
    credentials = Credentials.new
    block.call(credentials)
    @myanimelist_username = credentials.username
    @myanimelist_password = credentials.password

    true if block_given?
  end

  def self.search_anime(name)
    animes = Anime.new(username: @myanimelist_username, password: @myanimelist_password)
    animes.search name
  end

  def self.search_manga(name)
    manga = Manga.new(username: @myanimelist_username, password: @myanimelist_password)
    manga.search name
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
myanimelist-0.0.3 lib/myanimelist.rb
myanimelist-0.0.2 lib/myanimelist.rb