michael_taylor_sdk 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/design.md +18 -0
- data/lib/michael_taylor_sdk/api_paths/movies.rb +1 -0
- data/lib/michael_taylor_sdk/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: 79136525a44549f8e47452b9f228e88fd65e80926d9673519bba0b4a0e1d308a
|
4
|
+
data.tar.gz: 89c130376085c61cca9ca719b554b809cf6caad9fd38ce1e780ff0cc63f598cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d01ded32ecfc55cf562636a86d43d547a5963a5cc2c902bf81899566889b4e5236506d21bcbd46eef7606ae9ea3506ba91a393ebdaa0a38dd0e2ceda36d13f01
|
7
|
+
data.tar.gz: 6d77bde7627237ce80058576473ab0062f6bb9c52c197505c5a90da79de782ffe132572e558ef6c73876aa06c4a3f14bab912e79240d205c68801913e7246a3b
|
data/Gemfile.lock
CHANGED
data/design.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
This SDK is designed around a pipeline that transforms an SDK method call
|
2
|
+
into an HTTP request and transforms the response into an easy to use result.
|
3
|
+
Each pipeline stage is defined under the pipeline directory.
|
4
|
+
|
5
|
+
Each pipeline stage is designed to have a simple transformation on the input and/or output.
|
6
|
+
* paginate add pagination parameters to the input and adds the returned pagination properties into the output
|
7
|
+
* filter adds query parameters to the input for queries like name=Movie Name
|
8
|
+
* json converts the output from a string to a Ruby Hash by parsing the string as JSON
|
9
|
+
* response_body pulls the body from the HTTP response and ensures it is present and not empty
|
10
|
+
* set_path adds the path information that will later be appended to the base URL
|
11
|
+
* retry runs a retry strategy to attempt to resolve server errors
|
12
|
+
* raise_http_errors converts the HTTP response classes into errors for 4XX and 5XX response codes
|
13
|
+
* get_request is the final stage that makes the HTTP request
|
14
|
+
|
15
|
+
The main SDK object has methods that provide access to the API paths. These are defined under the api_paths directory.
|
16
|
+
Currently there is just `.movies` but it could be expanded to include other paths like `.books` or `.characters`
|
17
|
+
by adding new subclasses of MichaelTaylorSdk::ApiPaths::Base. These subclasses only need to define the main path used
|
18
|
+
in the API and any custom queries that abstract away complexity from the user by adding filters or combining related calls.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: michael_taylor_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Taylor
|
@@ -25,6 +25,7 @@ files:
|
|
25
25
|
- LICENSE.txt
|
26
26
|
- README.md
|
27
27
|
- Rakefile
|
28
|
+
- design.md
|
28
29
|
- lib/michael_taylor_sdk.rb
|
29
30
|
- lib/michael_taylor_sdk/api_paths/all_paths.rb
|
30
31
|
- lib/michael_taylor_sdk/api_paths/base.rb
|