myanimelist 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc5b0a10f6c3922cb468f342555e3925c2eb9578
4
- data.tar.gz: 9cac784a6cb777eb4157cc9b0312b84d7c6f9214
3
+ metadata.gz: 1d8e77f05e3680db2d96f13495dbbc870175a193
4
+ data.tar.gz: 05e0f5c18412229addebb096510fcaceb921e3d0
5
5
  SHA512:
6
- metadata.gz: 0d2140578e69db11756420d7a645f327ba50afa1a56d669410917dc2764875e09351e2b5be653f1f2b51c67960bf8eea5f4238e047b56c594a25fa57cad36bd0
7
- data.tar.gz: 18f71448dbd0e3432ae1f4ef9dbd8bab22c51ec3ba19a65021766bc5dfffc1a3387d7b239b5e617efe8cf3bc4e3dbd7b3048dfabf890cb61e52827ff023b8cc0
6
+ metadata.gz: bc7812a458ecae48e37ee8e4f5eea3465cc3a0c02b196f8b25d99ac2b79357beeb2136e44d6c0aac02a6bc22f97520274a1750d0834173d4e5f5abd8ee94d650
7
+ data.tar.gz: 14d83c4cbf80eb1546ccf2f13cf865af985eb1b4d18c4d4a2eeeae966934b9c655540926161c1a06e99978b1edb34a8a914815dcac4b531062702a5cf872b54a
data/README.md CHANGED
@@ -1,24 +1,46 @@
1
1
  # Myanimelist
2
-
3
- TODO: Write a gem description
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
- TODO: Write usage instructions here
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 :)
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Myanimelist
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -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 = 'http://myanimelist.net'
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.2
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: http://myanimelist.net
87
+ homepage: https://github.com/sanzo12/myanimelist
88
88
  licenses:
89
89
  - MIT
90
90
  metadata: {}