Skip to content

Commit fb564fe

Browse files
chore: update SDK settings
1 parent 5ee0a1f commit fb564fe

197 files changed

Lines changed: 2713 additions & 2618 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Layout/LineLength:
4040
AllowedPatterns:
4141
- "^\\s*#.*$"
4242
- ^require(_relative)?
43-
- "Tilda::Internal::Type::BaseModel$"
43+
- "TildaRuby::Internal::Type::BaseModel$"
4444
- "^\\s*[A-Z0-9_]+ = :"
45-
- "Tilda::(Models|Resources|Test)::"
45+
- "TildaRuby::(Models|Resources|Test)::"
4646
Max: 110
4747

4848
Layout/MultilineArrayLineBreaks:

.solargraph.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include:
55
- 'Rakefile'
66
- 'examples/**/*.rb'
77
- 'lib/**/*.rb'
8-
- 'test/tilda/resource_namespaces.rb'
9-
- 'test/tilda/test_helper.rb'
8+
- 'test/tilda_ruby/resource_namespaces.rb'
9+
- 'test/tilda_ruby/test_helper.rb'
1010
exclude:
1111
- 'rbi/**/*'

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hexlet%2Ftilda-d06441794bcf349b37439e4084aa5accb40ad16d553d5013cd33b9379f183dc1.yml
33
openapi_spec_hash: 231389205a35d2d6c56bd1cac4091e81
4-
config_hash: bd8285a8057799f62d48a60cf5a204cf
4+
config_hash: 02a97d1e54040f9bd1eeef26fc735da7

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This will install all the required dependencies.
1414

1515
## Modifying/Adding code
1616

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/tilda/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/tilda_ruby/helpers/` and `examples/` directory.
1818

1919
## Adding and running examples
2020

@@ -24,7 +24,7 @@ All files in the `examples/` directory are not modified by the generator and can
2424
#!/usr/bin/env ruby
2525
# frozen_string_literal: true
2626

27-
require_relative "../lib/tilda"
27+
require_relative "../lib/tilda_ruby"
2828

2929
# ...
3030
```
@@ -43,7 +43,7 @@ If you’d like to use the repository from source, you can either install from g
4343
To install via git in your `Gemfile`:
4444

4545
```ruby
46-
gem "tilda", git: "https://github.com/Hexlet/tilda-ruby"
46+
gem "tilda-ruby", git: "https://github.com/Hexlet/tilda-ruby"
4747
```
4848

4949
Alternatively, reference local copy of the repo:
@@ -53,7 +53,7 @@ $ git clone -- 'https://github.com/Hexlet/tilda-ruby' '<path-to-repo>'
5353
```
5454

5555
```ruby
56-
gem "tilda", path: "<path-to-repo>"
56+
gem "tilda-ruby", path: "<path-to-repo>"
5757
```
5858

5959
## Running commands

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
tilda (0.0.1)
14+
tilda-ruby (0.0.1)
1515
cgi
1616
connection_pool
1717

@@ -219,7 +219,7 @@ DEPENDENCIES
219219
syntax_tree
220220
syntax_tree-rbs!
221221
tapioca
222-
tilda!
222+
tilda-ruby!
223223
webmock
224224
webrick
225225
yard

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It is generated with [Stainless](https://www.stainless.com/).
66

77
## Documentation
88

9-
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/tilda).
9+
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/tilda-ruby).
1010

1111
## Installation
1212

@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
1515
<!-- x-release-please-start-version -->
1616

1717
```ruby
18-
gem "tilda", "~> 0.0.1"
18+
gem "tilda-ruby", "~> 0.0.1"
1919
```
2020

2121
<!-- x-release-please-end -->
@@ -24,9 +24,9 @@ gem "tilda", "~> 0.0.1"
2424

2525
```ruby
2626
require "bundler/setup"
27-
require "tilda"
27+
require "tilda_ruby"
2828

29-
tilda = Tilda::Client.new(
29+
tilda = TildaRuby::Client.new(
3030
api_key: ENV["TILDA_API_KEY"] # This is the default and can be omitted
3131
)
3232

@@ -37,17 +37,17 @@ puts(getpage)
3737

3838
### Handling errors
3939

40-
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 `Tilda::Errors::APIError` will be thrown:
40+
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 `TildaRuby::Errors::APIError` will be thrown:
4141

4242
```ruby
4343
begin
4444
getpage = tilda.getpage.retrieve(pageid: "REPLACE_ME")
45-
rescue Tilda::Errors::APIConnectionError => e
45+
rescue TildaRuby::Errors::APIConnectionError => e
4646
puts("The server could not be reached")
4747
puts(e.cause) # an underlying Exception, likely raised within `net/http`
48-
rescue Tilda::Errors::RateLimitError => e
48+
rescue TildaRuby::Errors::RateLimitError => e
4949
puts("A 429 status code was received; we should back off a bit.")
50-
rescue Tilda::Errors::APIStatusError => e
50+
rescue TildaRuby::Errors::APIStatusError => e
5151
puts("Another non-200-range status code was received")
5252
puts(e.status)
5353
end
@@ -79,7 +79,7 @@ You can use the `max_retries` option to configure or disable this:
7979

8080
```ruby
8181
# Configure the default for all requests:
82-
tilda = Tilda::Client.new(
82+
tilda = TildaRuby::Client.new(
8383
max_retries: 0 # default is 2
8484
)
8585

@@ -93,23 +93,23 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
9393

9494
```ruby
9595
# Configure the default for all requests:
96-
tilda = Tilda::Client.new(
96+
tilda = TildaRuby::Client.new(
9797
timeout: nil # default is 60
9898
)
9999

100100
# Or, configure per-request:
101101
tilda.getpage.retrieve(pageid: "REPLACE_ME", request_options: {timeout: 5})
102102
```
103103

104-
On timeout, `Tilda::Errors::APITimeoutError` is raised.
104+
On timeout, `TildaRuby::Errors::APITimeoutError` is raised.
105105

106106
Note that requests that time out are retried by default.
107107

108108
## Advanced concepts
109109

110110
### BaseModel
111111

112-
All parameter and response objects inherit from `Tilda::Internal::Type::BaseModel`, which provides several conveniences, including:
112+
All parameter and response objects inherit from `TildaRuby::Internal::Type::BaseModel`, which provides several conveniences, including:
113113

114114
1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.
115115

@@ -161,9 +161,9 @@ response = client.request(
161161

162162
### Concurrency & connection pooling
163163

164-
The `Tilda::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
164+
The `TildaRuby::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
165165

166-
Each instance of `Tilda::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.
166+
Each instance of `TildaRuby::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.
167167

168168
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.
169169

@@ -186,7 +186,7 @@ Or, equivalently:
186186
tilda.getpage.retrieve(pageid: "REPLACE_ME")
187187

188188
# You can also splat a full Params class:
189-
params = Tilda::GetpageRetrieveParams.new(pageid: "REPLACE_ME")
189+
params = TildaRuby::GetpageRetrieveParams.new(pageid: "REPLACE_ME")
190190
tilda.getpage.retrieve(**params)
191191
```
192192

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ multitask(:"build:gem") do
162162
sig/*
163163
GLOB
164164

165-
sh(*%w[gem build -- tilda.gemspec])
165+
sh(*%w[gem build -- tilda_ruby.gemspec])
166166
rm_rf(ignore_file)
167167
end
168168

lib/tilda.rb

Lines changed: 0 additions & 78 deletions
This file was deleted.

lib/tilda/models/getpage_retrieve_params.rb

Lines changed: 0 additions & 20 deletions
This file was deleted.

lib/tilda/models/getpageexport_retrieve_params.rb

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)