Module m_twitter

Model for mod_twitter.

Copyright © 2017-2018 Marc Worrell

Behaviours: zotonic_model.

Authors: Marc Worrell (marc@worrell.nl).

Description

Model for mod_twitter

Function Index

disable/3Disable a feed.
due/2Fetch all polls due, order by ascending due date.
get/2Fetch a subscriptions.
install/2Install the support tables for the twitter poller.
is_useauth/1
list/1Fetch a list of all twitter subscriptions.
m_get/3
next_due/1Return the next due (if any).
normalize_key/2
set_due/5Set the new due time for the feed, optionally set import stats.
set_import_count/3Set the import count for the subscription.
update_config_subscriptions/1
update_identitiy_subscription/2Update a single identity subscription.
update_identitiy_subscriptions/1Copy all twitter identities over to the subscriptions table, fk to identity record.

Function Details

disable/3

disable(SubscriptionId, Reason, Context) -> any()

Disable a feed

due/2

due(DT::calendar:datetime(), Context::z:context()) -> list()

Fetch all polls due, order by ascending due date

get/2

get(SubId::integer(), Context::z:context()) -> {ok, list()} | {error, not_found}

Fetch a subscriptions

install/2

install(Version, Context) -> any()

Install the support tables for the twitter poller.

is_useauth/1

is_useauth(Context::z:context()) -> boolean()

list/1

list(Context::z:context()) -> list()

Fetch a list of all twitter subscriptions

m_get/3

m_get(Rest::list(), Msg::zotonic_model:opt_msg(), Context::z:context()) -> zotonic_model:return()

next_due/1

next_due(Context::z:context()) -> calendar:datetime() | undefined

Return the next due (if any)

normalize_key/2

normalize_key(K::string() | binary() | undefined, Type::user | any) -> binary()

set_due/5

set_due(SubId::integer(), NewDue::calendar:datetime(), NewMaxId::integer() | undefined, ImportCount::integer(), Context::z:context()) -> ok | {error, not_found}

Set the new due time for the feed, optionally set import stats.

set_import_count/3

set_import_count(SubId::integer(), ImportCount::integer(), Context::z:context()) -> ok | {error, not_found}

Set the import count for the subscription

update_config_subscriptions/1

update_config_subscriptions(Context) -> any()

update_identitiy_subscription/2

update_identitiy_subscription(RscId, Context) -> any()

Update a single identity subscription

update_identitiy_subscriptions/1

update_identitiy_subscriptions(Context) -> any()

Copy all twitter identities over to the subscriptions table, fk to identity record


Generated by EDoc