dub 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/dub.rb +23 -0
- data/lib/open_api_sdk/analytics.rb +99 -0
- data/lib/open_api_sdk/domains.rb +577 -0
- data/lib/open_api_sdk/dub.rb +107 -0
- data/lib/open_api_sdk/links.rb +724 -0
- data/lib/open_api_sdk/metatags.rb +58 -0
- data/lib/open_api_sdk/models/operations/adddomain_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/adddomain_requestbody.rb +42 -0
- data/lib/open_api_sdk/models/operations/adddomain_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/color.rb +24 -0
- data/lib/open_api_sdk/models/operations/createlink_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +92 -0
- data/lib/open_api_sdk/models/operations/createlink_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createtag_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +27 -0
- data/lib/open_api_sdk/models/operations/createtag_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createworkspace_requestbody.rb +30 -0
- data/lib/open_api_sdk/models/operations/createworkspace_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/deletedomain_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/deletedomain_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +24 -0
- data/lib/open_api_sdk/models/operations/deletelink_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/deletelink_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +24 -0
- data/lib/open_api_sdk/models/operations/event.rb +21 -0
- data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +39 -0
- data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getlinks_request.rb +57 -0
- data/lib/open_api_sdk/models/operations/getlinks_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +54 -0
- data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getmetatags_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/getmetatags_response.rb +33 -0
- data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +30 -0
- data/lib/open_api_sdk/models/operations/getqrcode_request.rb +39 -0
- data/lib/open_api_sdk/models/operations/getqrcode_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/gettags_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/gettags_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getworkspace_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/getworkspace_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getworkspaces_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/groupby.rb +28 -0
- data/lib/open_api_sdk/models/operations/interval.rb +25 -0
- data/lib/open_api_sdk/models/operations/level.rb +21 -0
- data/lib/open_api_sdk/models/operations/listdomains_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/listdomains_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/paymentprocessor.rb +20 -0
- data/lib/open_api_sdk/models/operations/requestbody.rb +92 -0
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +87 -0
- data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/setprimarydomain_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/setprimarydomain_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/sort.rb +20 -0
- data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/trackcustomer_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +33 -0
- data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +42 -0
- data/lib/open_api_sdk/models/operations/tracklead_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +42 -0
- data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +39 -0
- data/lib/open_api_sdk/models/operations/tracksale_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +39 -0
- data/lib/open_api_sdk/models/operations/transferdomain_request.rb +33 -0
- data/lib/open_api_sdk/models/operations/transferdomain_requestbody.rb +24 -0
- data/lib/open_api_sdk/models/operations/transferdomain_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/type.rb +19 -0
- data/lib/open_api_sdk/models/operations/updatedomain_request.rb +33 -0
- data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +42 -0
- data/lib/open_api_sdk/models/operations/updatedomain_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/updatedomain_type.rb +19 -0
- data/lib/open_api_sdk/models/operations/updatelink_request.rb +33 -0
- data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +92 -0
- data/lib/open_api_sdk/models/operations/updatelink_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/upsertlink_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +92 -0
- data/lib/open_api_sdk/models/operations/upsertlink_response.rb +60 -0
- data/lib/open_api_sdk/models/operations.rb +81 -0
- data/lib/open_api_sdk/models/shared/badrequest.rb +24 -0
- data/lib/open_api_sdk/models/shared/code.rb +18 -0
- data/lib/open_api_sdk/models/shared/color.rb +24 -0
- data/lib/open_api_sdk/models/shared/conflict.rb +24 -0
- data/lib/open_api_sdk/models/shared/conflict_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/conflict_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/countrycode.rb +267 -0
- data/lib/open_api_sdk/models/shared/domains.rb +27 -0
- data/lib/open_api_sdk/models/shared/domainschema.rb +54 -0
- data/lib/open_api_sdk/models/shared/error.rb +30 -0
- data/lib/open_api_sdk/models/shared/forbidden.rb +24 -0
- data/lib/open_api_sdk/models/shared/forbidden_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/forbidden_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/geo.rb +771 -0
- data/lib/open_api_sdk/models/shared/internalservererror.rb +24 -0
- data/lib/open_api_sdk/models/shared/internalservererror_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/internalservererror_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/inviteexpired.rb +24 -0
- data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +771 -0
- data/lib/open_api_sdk/models/shared/linkschema.rb +139 -0
- data/lib/open_api_sdk/models/shared/notfound.rb +24 -0
- data/lib/open_api_sdk/models/shared/notfound_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/notfound_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/plan.rb +24 -0
- data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +24 -0
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/role.rb +19 -0
- data/lib/open_api_sdk/models/shared/security.rb +24 -0
- data/lib/open_api_sdk/models/shared/tagschema.rb +30 -0
- data/lib/open_api_sdk/models/shared/type.rb +19 -0
- data/lib/open_api_sdk/models/shared/unauthorized.rb +24 -0
- data/lib/open_api_sdk/models/shared/unauthorized_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/unauthorized_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/unprocessableentity.rb +24 -0
- data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +18 -0
- data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +30 -0
- data/lib/open_api_sdk/models/shared/users.rb +24 -0
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +81 -0
- data/lib/open_api_sdk/models/shared.rb +50 -0
- data/lib/open_api_sdk/qr_codes.rb +97 -0
- data/lib/open_api_sdk/sdkconfiguration.rb +54 -0
- data/lib/open_api_sdk/tags.rb +197 -0
- data/lib/open_api_sdk/track.rb +276 -0
- data/lib/open_api_sdk/utils/metadata_fields.rb +150 -0
- data/lib/open_api_sdk/utils/t.rb +59 -0
- data/lib/open_api_sdk/utils/utils.rb +772 -0
- data/lib/open_api_sdk/workspaces.rb +268 -0
- metadata +300 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bcf3c775453d2573a6ae926ba6c75561ed345960999142403d6c7e5e222744d9
|
4
|
+
data.tar.gz: b821247f88dd690d606f419cf1a2a6dcf05714f3b6a3e3a53d4544b4c32c45cb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 86ab1bc3adfc7a747d448038d5bfb9505f14e5e2558dac1469ae8a2e0ac88bd6b2e6c7d36028bec98da7840d3893419d105b1d20c3a74d563f2c42e757e6e85e
|
7
|
+
data.tar.gz: b2cee5dd81da2959bccabe6bff30b27fc4b07b68d4eb3ab3a1efbfb332e5e1443dad09749e7a6d9ede0c678bfe33d640827b0f43fc1227b15600b1c4ed39c81d
|
data/lib/dub.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
module OpenApiSDK
|
7
|
+
autoload :Dub, 'open_api_sdk/dub'
|
8
|
+
autoload :Shared, 'open_api_sdk/models/shared'
|
9
|
+
autoload :Operations, 'open_api_sdk/models/operations'
|
10
|
+
autoload :Links, 'open_api_sdk/links'
|
11
|
+
autoload :QRCodes, 'open_api_sdk/qr_codes'
|
12
|
+
autoload :Analytics, 'open_api_sdk/analytics'
|
13
|
+
autoload :Workspaces, 'open_api_sdk/workspaces'
|
14
|
+
autoload :Tags, 'open_api_sdk/tags'
|
15
|
+
autoload :Domains, 'open_api_sdk/domains'
|
16
|
+
autoload :Track, 'open_api_sdk/track'
|
17
|
+
autoload :Metatags, 'open_api_sdk/metatags'
|
18
|
+
end
|
19
|
+
|
20
|
+
require_relative 'open_api_sdk/utils/t'
|
21
|
+
require_relative 'open_api_sdk/utils/utils'
|
22
|
+
require_relative 'open_api_sdk/utils/metadata_fields'
|
23
|
+
require_relative 'open_api_sdk/sdkconfiguration'
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
require 'faraday'
|
7
|
+
require 'faraday/multipart'
|
8
|
+
require 'sorbet-runtime'
|
9
|
+
|
10
|
+
module OpenApiSDK
|
11
|
+
extend T::Sig
|
12
|
+
class Analytics
|
13
|
+
extend T::Sig
|
14
|
+
|
15
|
+
|
16
|
+
sig { params(sdk_config: SDKConfiguration).void }
|
17
|
+
def initialize(sdk_config)
|
18
|
+
@sdk_configuration = sdk_config
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::RetrieveAnalyticsRequest)).returns(::OpenApiSDK::Operations::RetrieveAnalyticsResponse) }
|
23
|
+
def retrieve(request)
|
24
|
+
# retrieve - Retrieve analytics for a link, a domain, or the authenticated workspace.
|
25
|
+
# Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.
|
26
|
+
url, params = @sdk_configuration.get_server_details
|
27
|
+
base_url = Utils.template_url(url, params)
|
28
|
+
url = "#{base_url}/analytics"
|
29
|
+
headers = {}
|
30
|
+
query_params = Utils.get_query_params(::OpenApiSDK::Operations::RetrieveAnalyticsRequest, request, @sdk_configuration.globals)
|
31
|
+
headers['Accept'] = 'application/json'
|
32
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
33
|
+
|
34
|
+
r = @sdk_configuration.client.get(url) do |req|
|
35
|
+
req.headers = headers
|
36
|
+
req.params = query_params
|
37
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
41
|
+
|
42
|
+
res = ::OpenApiSDK::Operations::RetrieveAnalyticsResponse.new(
|
43
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
44
|
+
)
|
45
|
+
if r.status == 200
|
46
|
+
if Utils.match_content_type(content_type, 'application/json')
|
47
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::Object)
|
48
|
+
res.one_of = out
|
49
|
+
end
|
50
|
+
elsif r.status == 400
|
51
|
+
if Utils.match_content_type(content_type, 'application/json')
|
52
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
53
|
+
res.bad_request = out
|
54
|
+
end
|
55
|
+
elsif r.status == 401
|
56
|
+
if Utils.match_content_type(content_type, 'application/json')
|
57
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
58
|
+
res.unauthorized = out
|
59
|
+
end
|
60
|
+
elsif r.status == 403
|
61
|
+
if Utils.match_content_type(content_type, 'application/json')
|
62
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
63
|
+
res.forbidden = out
|
64
|
+
end
|
65
|
+
elsif r.status == 404
|
66
|
+
if Utils.match_content_type(content_type, 'application/json')
|
67
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
68
|
+
res.not_found = out
|
69
|
+
end
|
70
|
+
elsif r.status == 409
|
71
|
+
if Utils.match_content_type(content_type, 'application/json')
|
72
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
73
|
+
res.conflict = out
|
74
|
+
end
|
75
|
+
elsif r.status == 410
|
76
|
+
if Utils.match_content_type(content_type, 'application/json')
|
77
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
78
|
+
res.invite_expired = out
|
79
|
+
end
|
80
|
+
elsif r.status == 422
|
81
|
+
if Utils.match_content_type(content_type, 'application/json')
|
82
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
83
|
+
res.unprocessable_entity = out
|
84
|
+
end
|
85
|
+
elsif r.status == 429
|
86
|
+
if Utils.match_content_type(content_type, 'application/json')
|
87
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
88
|
+
res.rate_limit_exceeded = out
|
89
|
+
end
|
90
|
+
elsif r.status == 500
|
91
|
+
if Utils.match_content_type(content_type, 'application/json')
|
92
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
93
|
+
res.internal_server_error = out
|
94
|
+
end
|
95
|
+
end
|
96
|
+
res
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|