act_as_api_client 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/act_as_api_client/clients/http_client.rb +2 -1
- data/lib/act_as_api_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13860c59da96b02912087fdca87e607dcd3dd06ad8f3e530512deaa955aedd2c
|
4
|
+
data.tar.gz: 8d88e51474d2df43bb768a225d883c43ef962d16d38555097e644d6a95b07de4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0924a1f702f7da3172d4d00a0a5489b2c1973e29f3322b3b7a9fd38b1746fe8972c10cca4e9b4d47a0ffe729f8e3eba818b707fcad9347c344364a2e202b5994'
|
7
|
+
data.tar.gz: 2caeec1dfddd4ede8aabb0de72949f14812087cbdc53404397baf83c4a7cd810aede6cf3796d99f5b7d093bf8ca31011cb206fe470c7aff28dd4394a364d5e85
|
data/README.md
CHANGED
@@ -53,13 +53,16 @@ Let's fetch all repositories from Rails organization:
|
|
53
53
|
|
54
54
|
```ruby
|
55
55
|
github_client = GithubClient.new()
|
56
|
+
|
57
|
+
github_client.find('Rukomoynikov/tabled')
|
56
58
|
github_client.find_by(organization: 'rails')
|
59
|
+
github_client.where('rails', per_page: 100)
|
57
60
|
```
|
58
61
|
|
59
62
|
Voila.
|
60
63
|
|
61
|
-
## List of supported
|
62
|
-
1. [Github Repositories](https://
|
64
|
+
## List of supported API clients
|
65
|
+
1. [Github Repositories](https://rubydoc.info/github/Rukomoynikov/act_as_api_client/ActAsApiClient/Clients/GithubClient)
|
63
66
|
|
64
67
|
## Development
|
65
68
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "net/http"
|
4
|
+
require "json"
|
4
5
|
|
5
6
|
module ActAsApiClient
|
6
7
|
module Clients
|
@@ -23,7 +24,7 @@ module ActAsApiClient
|
|
23
24
|
|
24
25
|
case response
|
25
26
|
when Net::HTTPNotFound, Net::HTTPSuccess, Net::HTTPUnprocessableEntity
|
26
|
-
JSON.parse(response.body)
|
27
|
+
::JSON.parse(response.body)
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: act_as_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Rukomoynikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Helps you to build reliable API clients in a minute. Just add act_as_api_client
|
14
14
|
to your classes
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubygems_version: 3.
|
64
|
+
rubygems_version: 3.2.3
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Collection of predefined API clients
|