myanimelist 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -6
- data/lib/myanimelist/anime.rb +1 -1
- data/lib/myanimelist/manga.rb +1 -1
- data/lib/myanimelist/version.rb +1 -1
- data/myanimelist.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d8e77f05e3680db2d96f13495dbbc870175a193
|
4
|
+
data.tar.gz: 05e0f5c18412229addebb096510fcaceb921e3d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc7812a458ecae48e37ee8e4f5eea3465cc3a0c02b196f8b25d99ac2b79357beeb2136e44d6c0aac02a6bc22f97520274a1750d0834173d4e5f5abd8ee94d650
|
7
|
+
data.tar.gz: 14d83c4cbf80eb1546ccf2f13cf865af985eb1b4d18c4d4a2eeeae966934b9c655540926161c1a06e99978b1edb34a8a914815dcac4b531062702a5cf872b54a
|
data/README.md
CHANGED
@@ -1,24 +1,46 @@
|
|
1
1
|
# Myanimelist
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
An API for http://myanimelist.net for searching animes and mangas up to date!
|
3
|
+
For additional documentation, visit: http://myanimelist.net/modules.php?go=api
|
5
4
|
## Installation
|
6
5
|
|
7
6
|
Add this line to your application's Gemfile:
|
8
7
|
|
9
|
-
gem 'myanimelist'
|
8
|
+
gem 'myanimelist', '~> 0.0.2'
|
10
9
|
|
11
10
|
And then execute:
|
12
11
|
|
13
|
-
$ bundle
|
12
|
+
$ bundle install
|
14
13
|
|
15
14
|
Or install it yourself as:
|
16
15
|
|
17
16
|
$ gem install myanimelist
|
18
17
|
|
18
|
+
### Configuration
|
19
|
+
MyAnimeList API requires authentication from the actual site, so you need to sign up first
|
20
|
+
<a href="http://myanimelist.net/register.php">here</a>
|
21
|
+
|
22
|
+
After signing up and verifying your email, you need to assign the username and password on your respective myanimelist API,
|
23
|
+
here's what you need to do,
|
24
|
+
If you are using Rails: setup `config/initializers/myanimelist.rb`:
|
25
|
+
```ruby
|
26
|
+
MyAnimeList.configure do |config|
|
27
|
+
config.username = "username"
|
28
|
+
config.password = "password"
|
29
|
+
end
|
30
|
+
```
|
31
|
+
If you are not using rails make sure to set this up before you can start searching.
|
32
|
+
|
19
33
|
## Usage
|
34
|
+
#####For Anime:
|
35
|
+
```ruby
|
36
|
+
MyAnimeList.search_anime("Anime name here.")
|
37
|
+
```
|
38
|
+
####For Manga:
|
39
|
+
```ruby
|
40
|
+
MyAnimeList.search_manga("Manga name here.")
|
41
|
+
```
|
20
42
|
|
21
|
-
|
43
|
+
Simple isn't it?
|
22
44
|
|
23
45
|
## Contributing
|
24
46
|
|
@@ -27,3 +49,6 @@ TODO: Write usage instructions here
|
|
27
49
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
50
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
51
|
5. Create new Pull Request
|
52
|
+
|
53
|
+
|
54
|
+
## Special Thanks for http://myanimelist.net, That's it, Thanks and have fun :)
|
data/lib/myanimelist/anime.rb
CHANGED
@@ -13,7 +13,7 @@ module MyAnimeList
|
|
13
13
|
def get_search(name)
|
14
14
|
response = RestClient::Request.new(
|
15
15
|
method: :get,
|
16
|
-
url: "http://myanimelist.net/api/anime/search.xml?q=#{name}",
|
16
|
+
url: "http://myanimelist.net/api/anime/search.xml?q=#{CGI::escape name}",
|
17
17
|
user: @myanimelist_username,
|
18
18
|
password: @myanimelist_password,
|
19
19
|
content_type: :xml ).execute
|
data/lib/myanimelist/manga.rb
CHANGED
@@ -13,7 +13,7 @@ module MyAnimeList
|
|
13
13
|
def get_search(name)
|
14
14
|
response = RestClient::Request.new(
|
15
15
|
method: :get,
|
16
|
-
url: "http://myanimelist.net/api/manga/search.xml?q=#{name}",
|
16
|
+
url: "http://myanimelist.net/api/manga/search.xml?q=#{CGI::escape name}",
|
17
17
|
user: @myanimelist_username,
|
18
18
|
password: @myanimelist_password,
|
19
19
|
content_type: :xml ).execute
|
data/lib/myanimelist/version.rb
CHANGED
data/myanimelist.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['godstrikerharvey@gmail.com']
|
11
11
|
spec.description = %q{The API for MyAnimeList.net}
|
12
12
|
spec.summary = %q{This gem will helps you to make your life easier and better :)}
|
13
|
-
spec.homepage = '
|
13
|
+
spec.homepage = 'https://github.com/sanzo12/myanimelist'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myanimelist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harvey Ico
|
@@ -84,7 +84,7 @@ files:
|
|
84
84
|
- lib/myanimelist/manga.rb
|
85
85
|
- lib/myanimelist/version.rb
|
86
86
|
- myanimelist.gemspec
|
87
|
-
homepage:
|
87
|
+
homepage: https://github.com/sanzo12/myanimelist
|
88
88
|
licenses:
|
89
89
|
- MIT
|
90
90
|
metadata: {}
|