Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 852 Bytes

USAGE.md

File metadata and controls

57 lines (42 loc) · 852 Bytes
require 'dub'


s = ::OpenApiSDK::Dub.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    token: "DUB_API_KEY",
  )
)


req = ::OpenApiSDK::Operations::CreateLinkRequestBody.new(
  url: "https://google.com",
  external_id: "123456",
  tag_ids: [
    "clux0rgak00011...",
  ],
)
    
res = s.links.create(req)

if ! res.link_schema.nil?
  # handle response
end
require 'dub'


s = ::OpenApiSDK::Dub.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    token: "DUB_API_KEY",
  )
)


req = ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(
  url: "https://google.com",
  external_id: "123456",
  tag_ids: [
    "clux0rgak00011...",
  ],
)
    
res = s.links.upsert(req)

if ! res.link_schema.nil?
  # handle response
end