BusyBird
view release on metacpan or search on metacpan
lib/BusyBird/Manual/Config.pod view on Meta::CPAN
B<Default:> "simple"
Specifies how L<Web Notifications|http://www.w3.org/TR/notifications/> are used in timeline views.
If set to C<"simple">, number of new statuses are notified using Web Notifications.
Setting it to any other value stops Web Notifications.
=head2 C<hidden> => BOOL
B<Default:> 0 (false)
If set to true, the timeline is hidden from the timeline list.
Hidden timelines are still accessible via Web API.
=head2 C<attached_image_urls_builder> => CODEREF($status)
B<Default:> return C<media_url> fields in Twitter Entities in C<< $status->{entities}{media} >> and C<< $status->{extended_entities}{media} >>.
Subroutine reference that is supposed to return a list of URL strings to the images attached to the C<$status>.
@image_urls = $builder->($status)
If it returns a string that doesn't look like a valid URL, that string is ignored.
=head2 C<attached_image_max_height> => INT
B<Default:> 360
The maximum height of images attached to statuses (in pixels).
If the original height is larger than this value, it shrinks the image and renders it.
=head2 C<attached_image_show_default> => STRING
B<Default:> C<"hidden">
Specifies how attached images are rendered in a timeline.
If set to C<"visible">, the attached images are visible by default.
Setting it to any other value hides the attached images.
=head2 C<acked_statuses_load_count> => INT
B<Default:> C<20>
The number of acked statuses loaded at once.
This affects the number of acked statuses loaded at initialization and when you click the "More..." button.
=head2 C<default_level_threshold> => INT
B<Default:> C<0>
The default level threshold for the timeline.
=head1 EXAMPLES
=head2 Customize Timestamps
Status timestamps are rendered using C<time_zone>, C<time_format>, C<time_locale> parameters.
By default L<BusyBird> guesses the "correct" config for your system.
busybird->set_config(
time_zone => 'America/Los_Angeles',
time_format => '%Y-%m-%d %A %H:%M:%S %Z',
time_locale => 'en_US',
);
=head2 Expand URLs for Links in Statuses
By default L<BusyBird> renders Twitter Entities in status objects just like Twitter does,
but you can customize this behavior by changing C<*_entity_url_builder> and C<*_entity_text_builder> parameters.
For example, Twitter truncates the displayed text for C<urls> and C<media> entites.
If you want to see fully expanded URLs in statuses, do the following.
my $builder_expanded_url = sub {
my ($text, $entity) = @_;
return $entity->{expanded_url};
};
busybird->set_config(
urls_entity_text_builder => $builder_expanded_url,
media_entity_text_builder => $builder_expanded_url,
);
=head2 Storage File Location
By default, L<BusyBird> stores statuses in the file C<~/.busybird/statuses.sqlite3>.
To change the storage file location, change C<default_status_storage> global config parameter.
use BusyBird::StatusStorage::SQLite;
busybird->set_config(
default_status_storage => BusyBird::StatusStorage::SQLite->new(
path => "$ENV{HOME}/.busybird/another_statuses.sqlite3"
)
);
The example uses C<~/.busybird/another_statuses.sqlite3> for the status storage.
See L<BusyBird::StatusStorage::SQLite> for detail.
Note that you should change C<default_status_storage> parameter B<< before you call C<timeline()> function. >>
=head1 SEE ALSO
=over
=item L<BusyBird::Manual::Config::Advanced>
Advanced topics about configuring L<BusyBird>.
=back
=head1 AUTHOR
Toshio Ito C<< <toshioito [at] cpan.org> >>
=cut
( run in 2.526 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )