Module: BlueFactory
- Extended by:
- Configurable, Feeds, Interactions
- Defined in:
- lib/blue_factory.rb,
lib/blue_factory/errors.rb,
lib/blue_factory/server.rb,
lib/blue_factory/version.rb,
lib/blue_factory/user_info.rb,
lib/blue_factory/interaction.rb,
lib/blue_factory/feed_handler.rb,
lib/blue_factory/configuration.rb,
lib/blue_factory/modules/feeds.rb,
lib/blue_factory/tasks/support.rb,
lib/blue_factory/request_context.rb,
lib/blue_factory/output_generator.rb,
lib/blue_factory/modules/configurable.rb,
lib/blue_factory/modules/interactions.rb
Overview
This is the main module of the library, through which you configure the feed service.
Defined Under Namespace
Modules: Configurable, Feeds, Interactions, Net Classes: AuthorizationError, ConfigurationError, FeedHandler, Interaction, InvalidFeedClassError, InvalidRequestError, InvalidResponseError, OutputGenerator, RequestContext, Server, UnsupportedAlgorithmError, UserInfo
Constant Summary collapse
- FEED_GENERATOR_TYPE =
The collection NSID of a Bluesky feed generator service.
'app.bsky.feed.generator'- MAX_LIMIT =
Maximum allowed value for the limit parameter in
getFeedSkeleton. 100- DEFAULT_LIMIT =
Default value for the limit parameter in
getFeedSkeleton. This value isn't used by the library (if no limit parameter is passed, it isn't added), but you can use it as a fallback in your code. 50- VERSION =
"0.3.0"
Constants included from Feeds
Class Method Summary collapse
-
.environment ⇒ Symbol
Current application environment, usually
:developmentor:production. -
.hostname ⇒ String?
The hostname on which the feed server runs.
-
.publisher_did ⇒ String?
The DID of the account publishing the feeds.
-
.service_did ⇒ String
The server's
did:web:service DID built from the configured hostname.
Methods included from Configurable
Methods included from Feeds
add_feed, all_feeds, feed_keys, get_feed
Methods included from Interactions
interactions_handler, interactions_handler=, on_interactions
Class Method Details
.environment ⇒ Symbol
Current application environment, usually :development or :production. It's read from the
env variables APP_ENV or RACK_ENV, or :development by default.
30 31 32 |
# File 'lib/blue_factory/configuration.rb', line 30 def self.environment (ENV['APP_ENV'] || ENV['RACK_ENV'] || :development).to_sym end |
.hostname ⇒ String?
The hostname on which the feed server runs. Configured through BlueFactory::Configurable#set.
|
|
# File 'lib/blue_factory/configuration.rb', line 34
|
.publisher_did ⇒ String?
The DID of the account publishing the feeds. Configured through BlueFactory::Configurable#set.
42 |
# File 'lib/blue_factory/configuration.rb', line 42 configurable :publisher_did, :hostname |
.service_did ⇒ String
The server's did:web: service DID built from the configured hostname.
16 17 18 19 20 21 22 |
# File 'lib/blue_factory/configuration.rb', line 16 def self.service_did if hostname.nil? raise ConfigurationError, "The `hostname` property is not set. Set it with: BlueFactory.set(:hostname, 'example.com')" end 'did:web:' + hostname end |