Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New filter APIs #115

Closed
komal-sai-yral opened this issue Mar 14, 2024 · 1 comment
Closed

New filter APIs #115

komal-sai-yral opened this issue Mar 14, 2024 · 1 comment

Comments

@komal-sai-yral
Copy link
Contributor

Switch to new filter APIs using cursor mode. Here are the contracts:

type NsfwFilter = variant { IncludeNsfw; OnlyNsfw; ExcludeNsfw };

  get_top_posts_aggregated_from_canisters_on_this_network_for_home_feed_cursor : (
      nat64,
      nat64,
      opt bool,
      opt PostStatus,
      opt NsfwFilter,
    ) -> (Result) query;
  get_top_posts_aggregated_from_canisters_on_this_network_for_hot_or_not_feed_cursor : (
      nat64,
      nat64,
      opt bool,
      opt PostStatus,
      opt NsfwFilter,
    ) -> (Result) query;

Can use either is_nsfw or NsfwFilter (values as enum above) . Preferably use NsfwFilter as is_nsfw will be deprecated later.

@rupansh-sekar-yral
Copy link
Collaborator

fixed by #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants