Class: Abqari::Syndication::Networks::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/abqari/syndication.rb

Overview

Base class — shared HTTP helpers, configuration lookup, common logging. Subclasses define name, configured?, post.

Direct Known Subclasses

Bluesky, Mastodon

Instance Method Summary collapse

Constructor Details

#initialize(site) ⇒ Base

Returns a new instance of Base.



270
271
272
273
# File 'lib/abqari/syndication.rb', line 270

def initialize(site)
  @site = site
  @cfg  = Syndication.network_config(site, name)
end

Instance Method Details

#configured?Boolean

Returns:

  • (Boolean)


279
280
281
# File 'lib/abqari/syndication.rb', line 279

def configured?
  false
end

#nameObject

Raises:

  • (NotImplementedError)


275
276
277
# File 'lib/abqari/syndication.rb', line 275

def name
  raise NotImplementedError
end

#post(text:, url:) ⇒ Object

Returns the URL of the syndicated post on success, nil on failure.

Raises:

  • (NotImplementedError)


284
285
286
# File 'lib/abqari/syndication.rb', line 284

def post(text:, url:)
  raise NotImplementedError
end