doge_api 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93c652ffeb43a425b75d4d1a5733cb761d3f0491
4
- data.tar.gz: a36722b1b58ff5a625cef93ea908bdb732bd8a44
3
+ metadata.gz: 4a59e01ba31bd1ced607b637a06c1abef101b245
4
+ data.tar.gz: 2e42764188e8d0701a9c323ba05d0bc00f7a16a5
5
5
  SHA512:
6
- metadata.gz: edb5fb8c6a16a66ce127dca00debae475cb90df24d625cac67529ae911a8b2c4d136cb5d5b92387d3e1c66d3e2922eeea348f78842c969753917da903e086c65
7
- data.tar.gz: f7eb3a0a8b5f25cf3374b30f8ee173089381b2c64c4029e8cd9c5dc9e27fbff504c38da956d769fa499aed794498014cc2cc0b107a91dcdec141b49c8251fe9a
6
+ metadata.gz: 53b2a702418b19c50624fbf9174ee6ce2e2ae79b3467215e209b29061e1591541b8bb2c3d2fb6c4f7dae13d1541e1cb5d9a2eac4bc9fb20c980668c6c69b7665
7
+ data.tar.gz: 5ed23498cd803e1eb8aad522c72ecc504babcadbfc7928b95db5573edd1c361ba5921efdd20bb7653c631fb8404fde697158c8cdf22a26d2a37118fb17aa4ea2
@@ -0,0 +1,28 @@
1
+ require 'uri'
2
+ require 'open-uri'
3
+
4
+ module DogeApi
5
+ class DogeApi
6
+ attr_accessor :api_key
7
+
8
+ def initialize(api_key)
9
+ @api_key = api_key
10
+ @base_uri = URI.parse('https://www.dogeapi.com/wow')
11
+ end
12
+
13
+ def build_uri(m, args)
14
+ uri = @base_uri
15
+ params = args.merge(:a => m, :api_key => @api_key)
16
+ uri.query = URI.encode_www_form(params)
17
+ uri
18
+ end
19
+
20
+ def fetch_uri(uri)
21
+ uri.open.read
22
+ end
23
+
24
+ def method_missing(m, args = {}, &block)
25
+ fetch_uri build_uri(m, args)
26
+ end
27
+ end
28
+ end
File without changes
@@ -1,28 +1,2 @@
1
- require 'uri'
2
- require 'open-uri'
3
-
4
- module DogeApi
5
- class DogeApi
6
- attr_accessor :api_key
7
-
8
- def initialize(api_key)
9
- @api_key = api_key
10
- @base_uri = URI.parse('https://www.dogeapi.com/wow')
11
- end
12
-
13
- def build_uri(m, args)
14
- uri = @base_uri
15
- params = args.merge(:a => m, :api_key => @api_key)
16
- uri.query = URI.encode_www_form(params)
17
- uri
18
- end
19
-
20
- def fetch_uri(uri)
21
- uri.open.read
22
- end
23
-
24
- def method_missing(m, args = {}, &block)
25
- fetch_uri build_uri(m, args)
26
- end
27
- end
28
- end
1
+ require_relative 'doge/api'
2
+ require_relative 'doge/chain'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxwell Bernstein
@@ -16,9 +16,9 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
- - main.rb
20
19
  - lib/doge_api.rb
21
- - lib/doge_chain.rb
20
+ - lib/doge/api.rb
21
+ - lib/doge/chain.rb
22
22
  homepage: http://github.com/tekknolagi/doge_api
23
23
  licenses:
24
24
  - MIT
data/main.rb DELETED
@@ -1,2 +0,0 @@
1
- require './lib/doge_api'
2
- require './lib/doge_chain'