btfy_client 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/btfy_client.rb +1 -0
- data/lib/btfy_client/requests/base_request.rb +17 -0
- data/lib/btfy_client/requests/create_link_request.rb +1 -10
- data/lib/btfy_client/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7df6f1b5e131c3b0a7d126ecb564b96ca94261beb6eb96e1d44947b2bf170ed5
|
4
|
+
data.tar.gz: fe20ac93e789a28e037c484f1823ce2218fe22519704bfc33cef09911a58ecb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44bd380a62a15522c9a08b83aef32e5cfc592fb5bab981b433f9a09f9a51baf21e3f8011a9d5d6e6f5cbdaa0d7d49aafb3fad828330c405c79429498b7aff593
|
7
|
+
data.tar.gz: 35a7dab01d17a7da404c051cbd3cee5c6dd2404b78b92e0771e71c0f6f1a341404b6bcc6aad7eeb9e96d5365e18379a4aa8c8854f9efc5cbbc97cc13f8a9c17e
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.4.0] - 2020-09-06
|
8
|
+
### Changed
|
9
|
+
- add `BaseRequest` for reuse
|
10
|
+
|
7
11
|
## [0.3.0] - 2020-09-06
|
8
12
|
### Added
|
9
13
|
- add `name` and `slug` request params
|
data/Gemfile.lock
CHANGED
data/lib/btfy_client.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module BtfyClient
|
2
|
+
class BaseRequest
|
3
|
+
|
4
|
+
include APIClientBase::Request
|
5
|
+
|
6
|
+
attribute :host, String
|
7
|
+
attribute :api_token, String
|
8
|
+
|
9
|
+
def headers
|
10
|
+
{
|
11
|
+
"Content-Type" => "application/json",
|
12
|
+
"Authorization" => "Bearer #{api_token}",
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -1,21 +1,12 @@
|
|
1
1
|
module BtfyClient
|
2
|
-
class CreateLinkRequest
|
2
|
+
class CreateLinkRequest < BaseRequest
|
3
3
|
|
4
4
|
include APIClientBase::Request
|
5
5
|
|
6
|
-
attribute :host, String
|
7
|
-
attribute :api_token, String
|
8
6
|
attribute :destination_url, String
|
9
7
|
attribute :name, String
|
10
8
|
attribute :slug, String
|
11
9
|
|
12
|
-
def headers
|
13
|
-
{
|
14
|
-
"Content-Type" => "application/json",
|
15
|
-
"Authorization" => "Bearer #{api_token}",
|
16
|
-
}
|
17
|
-
end
|
18
|
-
|
19
10
|
def body
|
20
11
|
body = { destination_url: destination_url }
|
21
12
|
|
data/lib/btfy_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: btfy_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Chavez
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/btfy_client.rb
|
104
104
|
- lib/btfy_client/client.rb
|
105
105
|
- lib/btfy_client/models/link.rb
|
106
|
+
- lib/btfy_client/requests/base_request.rb
|
106
107
|
- lib/btfy_client/requests/create_link_request.rb
|
107
108
|
- lib/btfy_client/responses/create_link_response.rb
|
108
109
|
- lib/btfy_client/version.rb
|