The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
chore: Refactor Sinatra app to use local variable instead of global variable for Dub instance
Kiran K9a78fce42a24
diff --git a/apps/docs/quickstart/sinatra.mdx b/apps/docs/quickstart/sinatra.mdxindex 4eacb4b02a..eb5419b67b 100644--- a/apps/docs/quickstart/sinatra.mdx+++ b/apps/docs/quickstart/sinatra.mdx@@ -30,8 +30,8 @@ Initialize the Dub Ruby SDK by creating a new instance of the `Dub` struct.require 'dub'before do- $dub = ::OpenApiSDK::Dub.new- $dub.config_security(+ dub = ::OpenApiSDK::Dub.new+ dub.config_security(::OpenApiSDK::Shared::Security.new(token: ENV['DUB_API_KEY'] # Use your Dub API key)@@ -55,7 +55,7 @@ post "/links" do))- res = $dub.links.create(req)+ res = dub.links.create(req)content_type :jsonres.raw_response.body@@ -79,7 +79,7 @@ post "/links" do))- res = $dub.links.create(req)+ res = dub.links.create(req)content_type :jsonres.raw_response.body@@ -98,7 +98,7 @@ put "/links" do),)- res = $dub.links.upsert(req)+ res = dub.links.upsert(req)content_type :jsonres.raw_response.body@@ -123,7 +123,7 @@ patch "/links" do))- res = $dub.links.update(req)+ res = dub.links.update(req)content_type :jsonres.raw_response.body@@ -142,7 +142,7 @@ get "/analytics" dogroup_by: ::OpenApiSDK::Operations::GroupBy::TIMESERIES)- res = $dub.analytics.retrieve(req)+ res = dub.analytics.retrieve(req)content_type :jsonres.raw_response.body