beeswaxapi 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -4
- data/lib/beeswaxapi/endpoints/report_queue.rb +5 -1
- data/lib/beeswaxapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f864da1b76c76ca0709d9851fae8a28301f5390df3f0434851ff3c5a0ac9d3a5
|
4
|
+
data.tar.gz: 2ce8ae284bdc19dfe2bfe25758475d8a571b2e63c50717f2a8dedc95483589ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0adc5f9b58776d21cb41ede4135e22ac89acaad79df5f407e9914a56c6005360b8168518cf6fb938a7cc7b70277f42d8b10c01d2b5bfadb588aeca3504daaaf1
|
7
|
+
data.tar.gz: 2fe420cf1ea6f94480c632d5f7b28349d8e386f48650da9d9eae785eaf93fba77e3b24bbeae129df5019d78b48f0d6ff3062ff7673bce38219d90263156345b5
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Beeswaxapi
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem is a wrapper for Beeswax Buzz API.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,41 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
To start work with `Beeswaxapi` you need setup your config.
|
24
|
+
|
25
|
+
### Configuration
|
26
|
+
|
27
|
+
Available configs:
|
28
|
+
|
29
|
+
- auth_strategy: by default `basic`. Can be changed to `cookies`.
|
30
|
+
- cookie\_file: path to file with cookies. Required for `cookies` auth\_strategy.
|
31
|
+
- base_uri: uri to beeswax api endpoint. Should be with `rest` path
|
32
|
+
- user_name: email of user
|
33
|
+
- password: password of user
|
34
|
+
- logger: this option enable logging
|
35
|
+
|
36
|
+
Example configuration for basic auth authentication:
|
37
|
+
|
38
|
+
```
|
39
|
+
BeeswaxAPI::App.configure do |config|
|
40
|
+
config.auth_strategy = 'basic'
|
41
|
+
config.base_uri = 'https://sandbox.api.beeswax.com/rest'
|
42
|
+
config.user_name = 'user@mail.com'
|
43
|
+
config.password = 'password'
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
Example configuration for cookies authentication:
|
48
|
+
|
49
|
+
```
|
50
|
+
BeeswaxAPI::App.configure do |config|
|
51
|
+
config.auth_strategy = 'cookies'
|
52
|
+
config.cookie_file = '/path/to/cookies-file.txt'
|
53
|
+
config.base_uri = 'https://sandbox.api.beeswax.com/rest'
|
54
|
+
config.user_name = 'user@mail.com'
|
55
|
+
config.password = 'password'
|
56
|
+
end
|
57
|
+
```
|
26
58
|
|
27
59
|
## Development
|
28
60
|
|
@@ -30,6 +62,10 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
30
62
|
|
31
63
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
64
|
|
65
|
+
## Sources
|
66
|
+
Beeswax Buzz API: [https://docs.beeswax.com/docs]
|
67
|
+
(https://docs.beeswax.com/docs/getting-started)
|
68
|
+
|
33
69
|
## Contributing
|
34
70
|
|
35
71
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/beeswaxapi.
|
@@ -8,7 +8,11 @@ module BeeswaxAPI
|
|
8
8
|
|
9
9
|
# NOTE: get method returns document in body
|
10
10
|
if origin_response.request.options[:method] == :get
|
11
|
-
|
11
|
+
if parsed_response_body.key? :payload
|
12
|
+
Response.new(parsed_response_body)
|
13
|
+
else
|
14
|
+
Response.new(payload: parsed_response_body)
|
15
|
+
end
|
12
16
|
else
|
13
17
|
Response.new(parsed_response_body)
|
14
18
|
end
|
data/lib/beeswaxapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beeswaxapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valentyn Ostakh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|