apiverve_randomgenerator 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/lib/apiverve_randomgenerator/client.rb +2 -2
- data/lib/apiverve_randomgenerator.rb +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86247e6185bdf8460d1e98ef7ff11a060eef67620a3a966bd2e85a706d91d18d
|
|
4
|
+
data.tar.gz: 02bd1f3547feaec82cdbbebfb7f95d069d2b578915f7b02c5f8e97567c82cb92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 116a2ab1964ed9459d6407d1e2fa7e4be1120ea7cb00882953a5bef9ce1398263931c7d47def9a8bf1421e70d386b24c7df98aed88add5c3a0de5ce218501a59
|
|
7
|
+
data.tar.gz: 6244d5b5e01c8e81074b503165899378d81314768d2b4b719720fca427b65265a00453b4e818f25149efdb1e18e7b812a6f9292b726801a573fe19e8944360fc
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Random Data Generator API - Ruby Gem
|
|
2
2
|
|
|
3
|
-
Random Data Generator produces
|
|
3
|
+
Random Data Generator produces random numbers in any range (whole or decimal, with or without repeats), dice of any size, coin flips, booleans, random strings, UUIDs, and mock names, emails, addresses and dates for application testing. Numbers, dice, coins, booleans and strings come from a cryptographically secure generator. Paid plans can generate batches up to 100 items.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -38,7 +38,14 @@ client = APIVerve::Randomgenerator::Client.new(api_key: "YOUR_API_KEY")
|
|
|
38
38
|
response = client.execute({
|
|
39
39
|
type: "number",
|
|
40
40
|
count: 1,
|
|
41
|
-
includeAvatar: true
|
|
41
|
+
includeAvatar: true,
|
|
42
|
+
min: 1,
|
|
43
|
+
max: 999999,
|
|
44
|
+
decimals: 2,
|
|
45
|
+
unique: true,
|
|
46
|
+
sides: 6,
|
|
47
|
+
length: 16,
|
|
48
|
+
charset: "alphanumeric"
|
|
42
49
|
})
|
|
43
50
|
|
|
44
51
|
# Print the response
|
|
@@ -50,7 +57,7 @@ puts response
|
|
|
50
57
|
|
|
51
58
|
```ruby
|
|
52
59
|
begin
|
|
53
|
-
response = client.execute({ type: "number", count: 1, includeAvatar: true })
|
|
60
|
+
response = client.execute({ type: "number", count: 1, includeAvatar: true, min: 1, max: 999999, decimals: 2, unique: true, sides: 6, length: 16, charset: "alphanumeric" })
|
|
54
61
|
puts response["data"]
|
|
55
62
|
rescue APIVerve::Randomgenerator::ValidationError => e
|
|
56
63
|
puts "Validation error: #{e.errors.join(', ')}"
|
|
@@ -10,7 +10,7 @@ module APIVerve
|
|
|
10
10
|
#
|
|
11
11
|
# @example Basic usage
|
|
12
12
|
# client = APIVerve::Randomgenerator::Client.new(api_key: "your_api_key")
|
|
13
|
-
# response = client.execute({ type: "number", count: 1, includeAvatar: true })
|
|
13
|
+
# response = client.execute({ type: "number", count: 1, includeAvatar: true, min: 1, max: 999999, decimals: 2, unique: true, sides: 6, length: 16, charset: "alphanumeric" })
|
|
14
14
|
# puts response
|
|
15
15
|
#
|
|
16
16
|
# @see https://apiverve.com/marketplace/randomgenerator?utm_source=ruby&utm_medium=referral&utm_content=readme
|
|
@@ -19,7 +19,7 @@ module APIVerve
|
|
|
19
19
|
DEFAULT_TIMEOUT = 30
|
|
20
20
|
|
|
21
21
|
# Validation rules for parameters
|
|
22
|
-
VALIDATION_RULES = { 'type' => { type: 'string', required: false }, 'count' => { type: 'integer', required: false, min: 1, max: 100 }, 'includeAvatar' => { type: 'boolean', required: false } }
|
|
22
|
+
VALIDATION_RULES = { 'type' => { type: 'string', required: false }, 'count' => { type: 'integer', required: false, min: 1, max: 100 }, 'includeAvatar' => { type: 'boolean', required: false }, 'min' => { type: 'number', required: false }, 'max' => { type: 'number', required: false }, 'decimals' => { type: 'integer', required: false, min: 0, max: 10 }, 'unique' => { type: 'boolean', required: false }, 'sides' => { type: 'integer', required: false, min: 2, max: 1000 }, 'length' => { type: 'integer', required: false, min: 1, max: 256 }, 'charset' => { type: 'string', required: false } }
|
|
23
23
|
|
|
24
24
|
# Format validation patterns
|
|
25
25
|
FORMAT_PATTERNS = {
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_randomgenerator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- APIVerve
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -58,9 +57,11 @@ dependencies:
|
|
|
58
57
|
- - "~>"
|
|
59
58
|
- !ruby/object:Gem::Version
|
|
60
59
|
version: '2.0'
|
|
61
|
-
description: Random Data Generator produces
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
description: Random Data Generator produces random numbers in any range (whole or
|
|
61
|
+
decimal, with or without repeats), dice of any size, coin flips, booleans, random
|
|
62
|
+
strings, UUIDs, and mock names, emails, addresses and dates for application testing.
|
|
63
|
+
Numbers, dice, coins, booleans and strings come from a cryptographically secure
|
|
64
|
+
generator. Paid plans can generate batches up to 100 items.
|
|
64
65
|
email:
|
|
65
66
|
- hello@apiverve.com
|
|
66
67
|
executables: []
|
|
@@ -79,7 +80,6 @@ metadata:
|
|
|
79
80
|
source_code_uri: https://github.com/apiverve/randomgenerator-API/tree/main/ruby
|
|
80
81
|
changelog_uri: https://apiverve.com/changelog
|
|
81
82
|
documentation_uri: https://docs.apiverve.com/ref/randomgenerator
|
|
82
|
-
post_install_message:
|
|
83
83
|
rdoc_options: []
|
|
84
84
|
require_paths:
|
|
85
85
|
- lib
|
|
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: '0'
|
|
96
96
|
requirements: []
|
|
97
|
-
rubygems_version:
|
|
98
|
-
signing_key:
|
|
97
|
+
rubygems_version: 4.0.23
|
|
99
98
|
specification_version: 4
|
|
100
99
|
summary: Random Data Generator API - Ruby Client
|
|
101
100
|
test_files: []
|