You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This will install all the required dependencies.
14
14
15
15
## Modifying/Adding code
16
16
17
-
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of `lib/imagekit/helpers/` and `examples/` directory.
17
+
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of `lib/imagekitio/helpers/` and `examples/` directory.
18
18
19
19
## Adding and running examples
20
20
@@ -24,7 +24,7 @@ All files in the `examples/` directory are not modified by the generator and can
24
24
#!/usr/bin/env ruby
25
25
# frozen_string_literal: true
26
26
27
-
require_relative"../lib/imagekit"
27
+
require_relative"../lib/imagekitio"
28
28
29
29
# ...
30
30
```
@@ -43,7 +43,7 @@ If you’d like to use the repository from source, you can either install from g
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Imagekit::Errors::APIError` will be thrown:
531
+
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Imagekitio::Errors::APIError` will be thrown:
532
532
533
533
```ruby
534
534
begin
535
535
file = image_kit.files.upload(
536
536
file:File.read("/path/to/file.jpg"),
537
537
file_name:"file-name.jpg"
538
538
)
539
-
rescueImagekit::Errors::APIConnectionError => e
539
+
rescueImagekitio::Errors::APIConnectionError => e
540
540
puts("The server could not be reached")
541
541
puts(e.cause) # an underlying Exception, likely raised within `net/http`
542
-
rescueImagekit::Errors::RateLimitError => e
542
+
rescueImagekitio::Errors::RateLimitError => e
543
543
puts("A 429 status code was received; we should back off a bit.")
544
-
rescueImagekit::Errors::APIStatusError => e
544
+
rescueImagekitio::Errors::APIStatusError => e
545
545
puts("Another non-200-range status code was received")
546
546
puts(e.status)
547
547
end
@@ -573,7 +573,7 @@ You can use the `max_retries` option to configure or disable this:
573
573
574
574
```ruby
575
575
# Configure the default for all requests:
576
-
image_kit =Imagekit::Client.new(
576
+
image_kit =Imagekitio::Client.new(
577
577
max_retries:0# default is 2
578
578
)
579
579
@@ -591,7 +591,7 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
591
591
592
592
```ruby
593
593
# Configure the default for all requests:
594
-
image_kit =Imagekit::Client.new(
594
+
image_kit =Imagekitio::Client.new(
595
595
timeout:nil# default is 60
596
596
)
597
597
@@ -603,15 +603,15 @@ image_kit.files.upload(
603
603
)
604
604
```
605
605
606
-
On timeout, `Imagekit::Errors::APITimeoutError` is raised.
606
+
On timeout, `Imagekitio::Errors::APITimeoutError` is raised.
607
607
608
608
Note that requests that time out are retried by default.
609
609
610
610
## Advanced concepts
611
611
612
612
### BaseModel
613
613
614
-
All parameter and response objects inherit from `Imagekit::Internal::Type::BaseModel`, which provides several conveniences, including:
614
+
All parameter and response objects inherit from `Imagekitio::Internal::Type::BaseModel`, which provides several conveniences, including:
615
615
616
616
1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.
617
617
@@ -664,9 +664,9 @@ response = client.request(
664
664
665
665
### Concurrency & connection pooling
666
666
667
-
The `Imagekit::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
667
+
The `Imagekitio::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
668
668
669
-
Each instance of `Imagekit::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
669
+
Each instance of `Imagekitio::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
670
670
671
671
When all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.
672
672
@@ -695,7 +695,7 @@ image_kit.files.upload(
695
695
)
696
696
697
697
# You can also splat a full Params class:
698
-
params =Imagekit::FileUploadParams.new(
698
+
params =Imagekitio::FileUploadParams.new(
699
699
file:File.read("/path/to/file.jpg"),
700
700
file_name:"file-name.jpg"
701
701
)
@@ -708,18 +708,18 @@ Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::E
0 commit comments