boogle 0.1.0 → 0.1.1
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 +4 -4
- data/.gitignore +3 -0
- data/lib/boogle.rb +2 -0
- data/lib/boogle/errors.rb +5 -5
- data/lib/boogle/service/request.rb +3 -5
- data/lib/boogle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68433670568e1771cb27d1910140be014b7fc3ae
|
4
|
+
data.tar.gz: 1465b6deff875dde7608f51fedcfe3210a4b539e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e55b1e2c762afa6396e621659f0a24e4f935e095662047870fa3ccad1854dab073672d29698a7e523e85197d721f233b86a567a6a50549f55a5c8365f8d06e
|
7
|
+
data.tar.gz: ac4e80d80dc3023a0346eeed220951acb1556c46efe96d2541b5416ff8ec636ade191c04b0f8d551aa223e84db78b2009c1667176636aef29b6ec46605757c71
|
data/.gitignore
CHANGED
data/lib/boogle.rb
CHANGED
data/lib/boogle/errors.rb
CHANGED
@@ -5,16 +5,16 @@ module Boogle
|
|
5
5
|
class BadRequest < BoogleErrors; end
|
6
6
|
# 400: Invalid Sharing Request
|
7
7
|
# 401: Invalid Credentials
|
8
|
-
class InvalidCredentials <
|
8
|
+
class InvalidCredentials < BoogleErrors; end
|
9
9
|
# 403: Daily Limit Exceeded
|
10
10
|
# 403: User Rate Limit Exceeded
|
11
11
|
# 403: Rate Limit Exceeded
|
12
12
|
# 403: Sharing Rate Limit Exceeded
|
13
|
-
class LimitExceedeed <
|
13
|
+
class LimitExceedeed < BoogleErrors; end
|
14
14
|
# 404: resource not found: {fileId}
|
15
|
-
class ResourceNotFound <
|
15
|
+
class ResourceNotFound < BoogleErrors; end
|
16
16
|
# 429: Too Many Requests
|
17
|
-
class TooManyRequests <
|
17
|
+
class TooManyRequests < BoogleErrors; end
|
18
18
|
# 500: Backend Error
|
19
|
-
class UnexpectedError <
|
19
|
+
class UnexpectedError < BoogleErrors; end
|
20
20
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'byebug'
|
2
|
-
|
3
1
|
module Boogle
|
4
2
|
module Service
|
5
3
|
class Request
|
@@ -15,7 +13,7 @@ module Boogle
|
|
15
13
|
req.url path
|
16
14
|
req.headers['Authorization'] = auth_token
|
17
15
|
end
|
18
|
-
response.status ==
|
16
|
+
response.status == 204 ? true : errors(response)
|
19
17
|
end
|
20
18
|
|
21
19
|
def remove(auth_token, key, path)
|
@@ -23,7 +21,7 @@ module Boogle
|
|
23
21
|
req.url path
|
24
22
|
req.headers['Authorization'] = auth_token
|
25
23
|
end
|
26
|
-
response.status ==
|
24
|
+
response.status == 204 ? true : errors(response)
|
27
25
|
end
|
28
26
|
|
29
27
|
def clear(auth_token, key, path)
|
@@ -31,7 +29,7 @@ module Boogle
|
|
31
29
|
req.url path
|
32
30
|
req.headers['Authorization'] = auth_token
|
33
31
|
end
|
34
|
-
response.status ==
|
32
|
+
response.status == 204 ? true : errors(response)
|
35
33
|
end
|
36
34
|
|
37
35
|
def search(key, path, params)
|
data/lib/boogle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boogle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HassanTC
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|