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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2872e7e3132a079bc57e2143b28a3898b18145033cde50bb6375c29400e91b38
4
- data.tar.gz: 186709908bdf7221b87e8c12879843bb0ebe03ab87741cb1d9af562a1aebe057
3
+ metadata.gz: 13860c59da96b02912087fdca87e607dcd3dd06ad8f3e530512deaa955aedd2c
4
+ data.tar.gz: 8d88e51474d2df43bb768a225d883c43ef962d16d38555097e644d6a95b07de4
5
5
  SHA512:
6
- metadata.gz: 00443a970f37aebf5b33cf1e32c6ff3f7dc9fafeef5cd1e36ec1e102ca2d856088dd152ea327a13628c715fc7bf187979b3183bf290b3aee5c46a264354df37d
7
- data.tar.gz: a0781851c2b72663c7e930a3504e2b828a4e894cebf4bd65810f49ca361ada94c193959af25fa43d68ed09d8753e27207d5ffe9c025dbf3d2c9c9a9d9753e32d
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 api clients
62
- 1. [Github Repositories](https://docs.github.com/en/rest/repos/repos)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActAsApiClient
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
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.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 00:00:00.000000000 Z
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.1.6
64
+ rubygems_version: 3.2.3
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Collection of predefined API clients