Community

The Community API service offers you the ability to discover, search, and retrieve communities related to recipe content that exist on Whisk.

Let's first understand the Community object and its data structure before looking at its endpoints’ description.

Community Object

A Community object is a collection of arrays and attributes that defines the data structure for any given community.

This is how the data structure of a community looks:

{
  "community": {
    "id": "39d539c738eb47debfb1a6319d34235a",
    "name": "WAPID Community",
    "image": {
      ...
    },
    "description": "Food and fun with WAPID!",
    "topics": [
      {
        "id": "914d167bb1754adbbcd1f085cdcc4f6c",
        "display_name": "Family Friendly"
      }
    ],
    "social_settings": {
      "website_url": "https://wapid.com/",
      "instagram_username": "wapid",
      "youtube_channel_url": "https://www.youtube.com/channel/WAPID",
      "tiktok_username": "wapid"
    },
     "permissions": {
      "role": "COMMUNITY_ROLE_OWNER",
      "mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_ANYONE",
      "visibility": "COMMUNITY_VISIBILITY_PUBLIC"
    },
    "members": {
      "count": 1
    },
    "recipes": {
      "count": 2
    },
    "is_sponsored": true
  }
}

Core Data

The following attributes define the core of a community:

Image

The image object contains the following attributes that store details of the cover image added in the community.

"image": {
    "url": "https://whisk-res.cloudinary.com/image/upload/v1611066523/v3/user-recipes/nfaul13bavzqyiirk0sl.jpg",
    "width": 1280,
    "height": 854
    "selection": {
      "x": 0,
      "y": 88,
      "width": 422,
      "height": 767
    }
},

Optional Data

The community data structure may include extra information based on any additional parameters included in the API request.

Topics

Topics are categories that appear on the home page of your Whisk app or website like - Featured Communities, 30 Minutes Meals, Quick and Healthy, etc. Each community is assigned a category at the time of its creation, and later we may also add it to the Featured Communities topic if we like it. The topics array contains a list of such topics that include the community.

"topics": [
    {
      "id": "914d167bb1754adbbcd1f085cdcc4f6c",
      "display_name": "Family Friendly"
    },
    {
      "id": "69f7f66c4c774fcf90ba4d5762f06517",
      "display_name": "Featured Communities"
    }
],

Each topic contains the following attributes:

Social Settings

This object contains details on the community's presence on different social platforms.

"social_settings": {
    "website_url": "https://wapid.com/",
    "instagram_username": "@wapid",
    "youtube_channel_url": "https://www.youtube.com/channel/WAPID",
    "tiktok_username": "@wapid"
},

Permissions

This object contains information on your role in the community and other details like the community's general visibility and contribution scope.

"permissions": {
    "role": "COMMUNITY_ROLE_OWNER",
    "mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_ANYONE",
    "visibility": "COMMUNITY_VISIBILITY_PUBLIC"
},

Endpoints

Community API includes the following endpoints that you can use to pull, discover or search communities and their details.

Last updated