lemur 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 +8 -8
- data/lemur.gemspec +1 -1
- data/lib/lemur.rb +8 -1
- data/lib/lemur/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWFmYzE1YTFhZTYxNGYwM2RmMjE5NWI4OWIxMmRjODZiYjRlNjZiYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2I5OTIyYzI0YjBhMTkyZGM0YjE2YTViM2UzYjRkNTY0MThkZDUxMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWY5NmQwMWM5YjhmYjdmYmQ1MzA5OGRjZTQ3YjA4NTM5YzgxZmU4YTdkZjRk
|
10
|
+
MmZkZDE0ODE2NDY5NDkxMThkMGI2Njc4NTMwODRiM2QwMmNmMTA1MTA0N2I4
|
11
|
+
ZDZlNTJiYzMyOTE0Y2EwZTQ2ZWVjNzJkMDBlZDAxYjc5YmFjNTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGIyZmFhYzhkOTNmZjdjYTcxZjgyMTIzNzc4Yjk2Nzc4ZWE1ODU5Y2QyMTg2
|
14
|
+
NjA5OTZjZTNjMTBmMDk5MDdiYjNhMDZhZWMzYjU1NzE5NGViNjI0NmUwMzYy
|
15
|
+
YjE0NzE2MzE1YjhjNTIzMzI3MWQ0YzNhYzliOWJkYzFjM2E3OWQ=
|
data/lemur.gemspec
CHANGED
data/lib/lemur.rb
CHANGED
@@ -4,6 +4,10 @@ require 'json'
|
|
4
4
|
require 'digest/md5'
|
5
5
|
|
6
6
|
module Lemur
|
7
|
+
|
8
|
+
class ApiError < StandardError
|
9
|
+
end
|
10
|
+
|
7
11
|
ODNOKLASSNIKI_API_URL = 'http://api.odnoklassniki.ru/fb.do'
|
8
12
|
ODNOKLASSNIKI_NEW_TOKEN_URL = 'http://api.odnoklassniki.ru/oauth/token.do'
|
9
13
|
|
@@ -51,7 +55,10 @@ module Lemur
|
|
51
55
|
|
52
56
|
def get(request_params)
|
53
57
|
@response = get_request(request_params)
|
54
|
-
JSON.parse(response.body)
|
58
|
+
json_data = JSON.parse(response.body)
|
59
|
+
if json_data['error_code'].present?
|
60
|
+
raise ApiError, json_data
|
61
|
+
end
|
55
62
|
end
|
56
63
|
|
57
64
|
private
|
data/lib/lemur/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lemur
|
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
|
- Eduard Gataullin
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: faraday
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.8'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.8'
|
55
55
|
description: Lemur is a lightweight, flexible Ruby SDK for Odnoklassniki. It allows
|
56
56
|
read/write access to Odnoklassniki API. To work with Lemur you need VALUABLE ACCESS
|
57
57
|
to odnoklassniki api. This api work only with access_token that gives you odnoklassniki,
|