to_net_me_api 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,23 @@
1
- # require 'httparty'
1
+ require 'httparty'
2
2
  module ToNetMeApi
3
3
  # Модуль обрабатывает запросы к API 2et.me и возвращает HTTParty объект .
4
4
  module API
5
5
 
6
+
6
7
  class << self
7
-
8
+
9
+ def set_api_core
10
+ unless ToNetMeApi.api_core
11
+ ToNetMeApi.reset
12
+ else
13
+ ToNetMeApi.api_core
14
+ end
15
+ end
16
+
8
17
  def call(attrs,options={},auth_key = nil)
9
18
  @auth = {:auth_key => auth_key}
10
19
  options.merge!(@auth)
11
- HTTParty.get('http://api.2net.me/'+attrs,:query => options)
20
+ HTTParty.get(set_api_core+attrs,:query => options)
12
21
  end
13
22
 
14
23
  end
@@ -1,4 +1,4 @@
1
1
  module ToNetMeApi
2
2
  # Library version.
3
- VERSION = '0.2'
3
+ VERSION = '0.3'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_net_me_api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: