parameters: (self, campaign_id)
docstring: Get an active campaign's information
          ---
          tags:
              - campaigns
          produces:
              - application/json
          parameters:
              - in: header
                name: Authorization
                description: Base64 encoded session token
                type: string
                default: Token sessionTokenHere==
              - in: header
                name: Accept-Language
                description: Language user is requesting
                type: string
                required: true
                default: en
              - name: campaign_id
                in: path
                description: Campaign ID
                required: true
                type: integer
                default: 1
          responses:
              200:
                  description: Campaign found
              404:
                  description: No Campaign found
              500:
                  description: Internal Server Error
docstring_summary: Get an active campaign's information
          ---
          tags:
              - campaigns
          produces:
              - application/json
          parameters:
              - in: header
                name: Authorization
                description: Base64 encoded session token
                type: string
                default: Token sessionTokenHere==
              - in: header
                name: Accept-Language
                description: Language user is requesting
                type: string
                required: true
                default: en
              - name: campaign_id
                in: path
                description: Campaign ID
                required: true
                type: integer
                default: 1
          responses:
              200:
                  description: Campaign found
              404:
                  description: No Campaign found
              500:
                  description: Internal Server Error
docstring_tokens: Get an active campaign s information --- tags : - campaigns produces : - application / json parameters : - in : header name : Authorization description : Base64 encoded session token type : string default : Token sessionTokenHere == - in : header name : Accept - Language description : Language user is requesting type : string required : true default : en - name : campaign_id in : path description : Campaign ID required : true type : integer default : 1 responses : 200 : description : Campaign found 404 : description : No Campaign found 500 : description : Internal Server Error
function: def get(self, campaign_id):
          """
          Get an active campaign's information
          ---
          tags:
              - campaigns
          produces:
              - application/json
          parameters:
              - in: header
                name: Authorization
                description: Base64 encoded session token
                type: string
                default: Token sessionTokenHere==
              - in: header
                name: Accept-Language
                description: Language user is requesting
                type: string
                required: true
                default: en
              - name: campaign_id
                in: path
                description: Campaign ID
                required: true
                type: integer
                default: 1
          responses:
              200:
                  description: Campaign found
              404:
                  description: No Campaign found
              500:
                  description: Internal Server Error
          """
          try:
              authenticated_user_id = token_auth.current_user()
              if authenticated_user_id:
                  campaign = CampaignService.get_campaign_as_dto(
                      campaign_id, authenticated_user_id
                  )
              else:
                  campaign = CampaignService.get_campaign_as_dto(campaign_id, 0)
              return campaign.to_primitive(), 200
          except NotFound:
              return {"Error": "No campaign found"}, 404
          except Exception as e:
              error_msg = f"Campaign GET - unhandled error: {str(e)}"
              current_app.logger.critical(error_msg)
              return {"Error": error_msg}, 500
function_tokens: def get ( self , campaign_id ) : try : authenticated_user_id = token_auth . current_user ( ) if authenticated_user_id : campaign = CampaignService . get_campaign_as_dto ( campaign_id , authenticated_user_id ) else : campaign = CampaignService . get_campaign_as_dto ( campaign_id , 0 ) return campaign . to_primitive ( ) , 200 except NotFound : return { "Error" : "No campaign found" } , 404 except Exception as e : error_msg = f"Campaign GET - unhandled error: {str(e)}" current_app . logger . critical ( error_msg ) return { "Error" : error_msg } , 500