@@ -209,14 +209,14 @@ def clearLocations(self):
209209 self .topicPage ["locations" ] = []
210210
211211
212- def addConcept (self , conceptUri , weight , label = None , conceptType = None ):
212+ def addConcept (self , conceptUri , weight , label = None , conceptType = None , required = False ):
213213 """
214214 add a relevant concept to the topic page
215215 @param conceptUri: uri of the concept to be added
216216 @param weight: importance of the provided concept (typically in range 1 - 50)
217217 """
218218 assert isinstance (weight , (float , int )), "weight value has to be a positive or negative integer"
219- concept = {"uri" : conceptUri , "wgt" : weight }
219+ concept = {"uri" : conceptUri , "wgt" : weight , "required" : required }
220220 if label != None : concept ["label" ] = label
221221 if conceptType != None : concept ["type" ] = conceptType
222222 self .topicPage ["concepts" ].append (concept )
@@ -391,4 +391,4 @@ def getEvents(self,
391391 }
392392 params .update (returnInfo .getParams ("events" ))
393393 params .update (kwargs )
394- return self .eventRegistry .jsonRequest ("/api/v1/event" , params )
394+ return self .eventRegistry .jsonRequest ("/api/v1/event" , params )
0 commit comments