ya-api-direct 0.2.2 → 0.2.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 +3 -3
- data/bin/setup +1 -0
- data/lib/ya/api/direct/direct_service_base.rb +2 -4
- data/lib/ya/api/direct/direct_service_v4.rb +2 -2
- data/lib/ya/api/direct/direct_service_v5.rb +2 -3
- data/lib/ya/api/direct/gateway.rb +1 -1
- data/lib/ya/api/direct/url_helper.rb +0 -1
- data/lib/ya/api/direct/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f41fcfc8d138f967b885a44c1aab2eb596cb666
|
4
|
+
data.tar.gz: 4ebf9203b1bd38e056c7976f72a52a66b38360ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 398d24fef634c7812d844208e47ea5885db35ec0d9121f9d61982e1291169a636b5686c934528a27f99dae6e33b1f3fc6879f8a81bc821fcccb2ac61ca449d28
|
7
|
+
data.tar.gz: 54384d49276fafcd928d7d96fbd5d916728673f7e1e9f6a088e163c05de7f69b16b61184470b27fc4babeac844ed6d32962ad56209ccf979e4ae2c523dfa8893
|
data/README.md
CHANGED
@@ -75,9 +75,9 @@ Date returned with first call of caching method is stored in ``cache_timestamp``
|
|
75
75
|
|
76
76
|
Units data of last request is stored in ``units_data`` property. There're 3 keys in this hash:
|
77
77
|
|
78
|
-
* ``just_used``
|
79
|
-
* ``units_left``
|
80
|
-
* ``units_limit``
|
78
|
+
* ``just_used`` - units used by last request.
|
79
|
+
* ``units_left`` - units left for the current session.
|
80
|
+
* ``units_limit`` - units limit for a session of your account.
|
81
81
|
|
82
82
|
They were added only in Yandex Direct API 5. Calling the methods from 4 or 4 Live doesn't update them.
|
83
83
|
|
data/bin/setup
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
require "ya/api/direct/constants"
|
2
|
-
|
3
1
|
module Ya::API::Direct
|
4
2
|
class DirectServiceBase
|
5
3
|
attr_reader :method_items, :version
|
6
|
-
def initialize(client,
|
4
|
+
def initialize(client, methods_data)
|
7
5
|
@client = client
|
8
|
-
@method_items =
|
6
|
+
@method_items = methods_data
|
9
7
|
init_methods
|
10
8
|
end
|
11
9
|
|
@@ -4,8 +4,8 @@ require "ya/api/direct/direct_service_base"
|
|
4
4
|
module Ya::API::Direct
|
5
5
|
class DirectServiceV4 < DirectServiceBase
|
6
6
|
|
7
|
-
def initialize(client,
|
8
|
-
super(client,
|
7
|
+
def initialize(client, methods_data, version = :v4)
|
8
|
+
super(client, methods_data)
|
9
9
|
@version = version
|
10
10
|
end
|
11
11
|
|
@@ -1,12 +1,11 @@
|
|
1
|
-
require "ya/api/direct/constants"
|
2
1
|
require "ya/api/direct/direct_service_base"
|
3
2
|
|
4
3
|
module Ya::API::Direct
|
5
4
|
class DirectServiceV5 < DirectServiceBase
|
6
5
|
attr_reader :service, :service_url
|
7
6
|
|
8
|
-
def initialize(client, service,
|
9
|
-
super(client,
|
7
|
+
def initialize(client, service, methods_data)
|
8
|
+
super(client, methods_data)
|
10
9
|
@service = service
|
11
10
|
@service_url = service.downcase
|
12
11
|
@version = :v5
|