RMAL
MyAnimeList backend Ruby API
Under Development
This project hasn't even finished adding the basic functionality yet, and so, it is certainly not ready for actual use.
Installation
Add this line to your application's Gemfile:
gem 'rMAL'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rMAL
Usage
So far, one can do the following.
Settings
Settings include the username, password and api-key and are all saved in a settings.yml file in a directory of choice.
Init
RMAL::Settings.init(dir) # dir should be where you want to store your settings (default is "/")
Note that this stores the directory you've chosen as the global variable $path.
Set
RMAL::Settings.set(username, password, apikey) # self-explanatory, no defaults
Load
RMAL::Settings.load(path) # Load settings, takes path to settings.yml
This will create the global variables $w_username, $w_password and w_apikey.
Login
This just verifies credentials.
RMAL.login
It'll output your login ID and username.
Search (Not even remotely complete)
RMAL.search(type, query) # type is manga/anime (default anime), and query is your search query
So far, this just dumps the entire XML result on you. Parsing comes next.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Changelog(ue)
0.0.3
Added functional settings and login functionality, started on search. There seems to be an issue with use:
# Usage
RMAL::Settings.init("C:\\Users\\username\\Desktop\\Wherever") # Windows filesystem annoyances
RMAL::Settings.set("username", "password", "apikey")
RMAL.login # or search or whatever
# However, the first two lines seem to be required for execution each time, which they shouldn't. Research into this issue has yet to be started, so hopefully it's trivial.
0.0.2
Updating README and Gemfile for documentation purposes.
0.0.1
Just getting it up to wait for MAL development user agent.