AppBlockList.App (AppBlockList v1.0.0)

Copy Markdown View Source

One answer from the App Lookup API.

A 200 answer gives found: true. A 404 answer gives found: false; for a Google Play app that is not yet categorized, android_package is set and pending_android?/1 returns true.

Summary

Functions

True when at least one category of the app is in blocked.

Builds a struct from a decoded JSON map (string keys).

Case-insensitive test for one category.

Categories of the app that appear in blocked, in ranked order.

The numeric part of the age rating: 12 for "12+", nil when missing.

Listed on Google Play but not yet in the categorized database.

The most descriptive filtering category, or nil.

Map with the API field names, ready for Jason.encode!/1.

Types

t()

@type t() :: %AppBlockList.App{
  age_rating: String.t(),
  android_package: String.t(),
  app_store_genre: String.t(),
  app_store_id: String.t(),
  bundle_id: String.t(),
  developer: String.t(),
  developer_domain: String.t(),
  error: String.t() | nil,
  filtering_categories: [String.t()],
  found: boolean(),
  iab_category: String.t(),
  name: String.t(),
  raw: map()
}

Functions

blocked_by?(app, blocked)

@spec blocked_by?(t(), Enumerable.t()) :: boolean()

True when at least one category of the app is in blocked.

from_map(map)

@spec from_map(map()) :: t()

Builds a struct from a decoded JSON map (string keys).

has_category?(app, category)

@spec has_category?(t(), String.t()) :: boolean()

Case-insensitive test for one category.

matching_categories(app, blocked)

@spec matching_categories(t(), Enumerable.t()) :: [String.t()]

Categories of the app that appear in blocked, in ranked order.

minimum_age(app)

@spec minimum_age(t()) :: non_neg_integer() | nil

The numeric part of the age rating: 12 for "12+", nil when missing.

pending_android?(app)

@spec pending_android?(t()) :: boolean()

Listed on Google Play but not yet in the categorized database.

primary_category(app)

@spec primary_category(t()) :: String.t() | nil

The most descriptive filtering category, or nil.

to_map(app)

@spec to_map(t()) :: map()

Map with the API field names, ready for Jason.encode!/1.