DataSrc:DemoJan25/StrapiPublic-Disseminations: Difference between revisions

    From UNITApedia
    (Created page with "== Strapi Events Display == <!-- 1) Fetch the data with #get_web_data --> {{#get_web_data: |url = https://unitapedia.univ-unita.eu/strapi/api/events?populate=events,SupplementaryInfo |format = json |data = EventID = id, CreatedAt = createdAt, UpdatedAt = updatedAt, PublishedAt = publishedAt, EventType = Type, Participants = Participants, Certificate = Certificate, Category = Category, EventDa...")
     
    No edit summary
    Line 1: Line 1:
    == Strapi Events Display ==
    <!-- 1) Fetch the data with #get_web_data -->
    {{#get_web_data:
    {{#get_web_data:
       |url    = https://unitapedia.univ-unita.eu/strapi/api/events?populate=events,SupplementaryInfo
       |url    = https://unitapedia.univ-unita.eu/strapi/api/public-disseminations?populate=Dissemination.social-media
       |format  = json
       |format  = json
      |headers = Authorization: Bearer STRAPI_TOKEN
       |data    =  
       |data    =  
         EventID      = id,
         DisseminationID      = data.*.id,
         CreatedAt     = createdAt,
         CreatedAt           = data.*.createdAt,
         UpdatedAt     = updatedAt,
         UpdatedAt           = data.*.updatedAt,
         PublishedAt   = publishedAt,
         PublishedAt         = data.*.publishedAt,
         EventType    = Type,
         SocialMediaID        = data.*.attributes.Dissemination.*.id,
         Participants  = Participants,
         Platform            = data.*.attributes.Dissemination.*.platform,
         Certificate  = Certificate,
         Views                = data.*.attributes.Dissemination.*.views,
         Category     = Category,
         GainedFollowers     = data.*.attributes.Dissemination.*.gained_followers,
        EventDate    = Date,
         Followers            = data.*.attributes.Dissemination.*.followers,
        Publication  = Publication,
         Activities          = data.*.attributes.Dissemination.*.activities
         Seminars      = Seminars,
         Workshops    = Workshops
       |debug  = 1
       |debug  = 1
    }}
    }}


    <!-- 2) Display the data -->
    <!-- Store each dissemination as a subobject -->
    {{#if:{{#external_value:EventID}} |
    {{#store_external_table: StrapiPublicDissemination
       === Event Details ===
      |DisseminationID      = {{{DisseminationID}}}
      * **Event ID:** {{#external_value:EventID}}
       |CreatedAt            = {{{CreatedAt}}}
       * **Created At:** {{#external_value:CreatedAt}}
       |UpdatedAt            = {{{UpdatedAt}}}
       * **Updated At:** {{#external_value:UpdatedAt}}
       |PublishedAt          = {{{PublishedAt}}}
       * **Published At:** {{#external_value:PublishedAt}}
       |SocialMediaID        = {{{SocialMediaID}}}
     
       |Platform            = {{{Platform}}}
       * **Type:** {{#external_value:EventType}}
       |Views                = {{{Views}}}
       * **Participants:** {{#external_value:Participants}}
       |GainedFollowers      = {{{GainedFollowers}}}
       * **Certificate:** {{#external_value:Certificate}}
       |Followers            = {{{Followers}}}
       * **Category:** {{#external_value:Category}}
       |Activities          = {{{Activities}}}
       * **Date:** {{#external_value:EventDate}}
    }}


      * **Publication:** {{#external_value:Publication}}
    <!-- Query and display all dissemination records in a table -->
      * **Seminars:** {{#external_value:Seminars}}
    {{#ask: [[-Has subobject::{{FULLPAGENAME}}]]
      * **Workshops:** {{#external_value:Workshops}}
    |?DisseminationID
    |  
    |?CreatedAt
      * **Error:** Unable to retrieve event data. Check the debug output below.
    |?UpdatedAt
    |?PublishedAt
    |?SocialMediaID
    |?Platform
    |?Views
    |?GainedFollowers
    |?Followers
    |?Activities
    |format=table
    |class=wikitable
    |headers=show
    |mainlabel=-
    }}
    }}

    Revision as of 11:37, 28 January 2025



    DisseminationIDCreatedAtUpdatedAtPublishedAtSocialMediaIDPlatformViewsGainedFollowersFollowersActivities
    17
    4Instagram1001001,1001
    5Instagram1001,30010
    19Instagram1002001,35022
    8Instagram3004002,50010
    16
    11
    11Instagram2002002,10010
    7Instagram10001,90012
    12
    9
    14
    6Instagram2001001,70010
    8Instagram10010010010
    15
    15Instagram100501,1501
    10Instagram2003002,00010
    10
    9Instagram1003001,60010
    13