Ejemplo n.º 1
0
    def addAttendeeActivity(self,attendeeID,registrationNumber=None,eventIDs=None,eventID=None):
        '''addAttendeeActivity
        Returns an XML payload containing the results of the attendee add activity method. The 'stat' attribute
        is used to indicate the success or failure of the request. Extended description of all options are listed
        below.
        Sample Request URL: http://.../?do=cnt.getservice&service=addAttendeeActivity&[Parameter List]
        
        Parameter Options:
        :param *attendeeID: Numeric value used to identify the attendee record to update. attendeeID or
        registrationNumber required.
        :param registrationNumber: String value used to identify the attendee record to update. attendeeID or
        registrationNumber required.
        :param eventIDs: Comma delimited list of event to be added to a person's activity list. eventIDs or eventID
        required
        :param eventID: Numeric value identifying an event to be added to a person's activity list. eventIDs or
        eventID required.
        '''

        if eventIDs == None and eventID == None:
            print("Either eventIDs or eventID must be specified!")
        else:
            url = "%s/?do=cnt.getservice&service=addAttendeeActivity" %(self.api.base)

            args = {"attendeeID":attendeeID,
                    "registrationNumber":registrationNumber,
                    "eventIDs":eventIDs,
                    "eventID":eventID}
 
            result = self.get_result(url,args)
            # Note to developer - ditto above, I didn't test this. The response should be tested and
            # it might make sense to have an argument that if True, returns the new attendee activity
            return ordered_to_dict(result)
Ejemplo n.º 2
0
    def getRoomSetSearchResults(self,searchText=None,locationID=None,roomID=None,startsOnDate=None,
                                     code=None,postFlag=None):
        '''getRoomSetSearchResults
        Returns an XML payload containing a Room Set listing. This data set returned is smaller than the
        getRoomSets request and intend for listing results. Use the result in combination with the getRoomSet
        call to pull addition information on a specific RoomSet.
        Sample Request URL: http://.../?do=cnt.getservice&service=getRoomSetSearchResults
        
        Request Parameters        
        :param searchText: Text string used to perform a general search of the Room Sets. Searches for matches in
        function name, code, location, and room. 
        :param locationID: Numeric value containing a valid locationID.
        Use the 'getRoomSetSearchOptions' call to obtain a valid list of locations
        :param roomID: Numeric value containing a valid roomID. Use the 'getRoomSetSearchOptions' call to obtain
        a valid list of rooms. 
        :param startsOnDate: Date value containing a valid date. Use the 'getSearchOptions'
        call to obtain a valid list of dates. 
        :param code: text value containing a valid code. Use the 'getSearchOptions' call to obtain the list of possible  
        Room Set Codes.
        :param postFlag: Boolean value (0 or 1).
        '''
        url = "%s/?do=cnt.getservice&service=getRoomSetSearchResults" %(self.api.base)

        args = {"searchText":searchText,
                "locationID":locationID,
                "roomID":roomID,
                "startsOnDate":startsOnDate,
                "code":code,
                "postFlag":postFlag}

        result = self.get_result(url,args)
        return ordered_to_dict(result)
Ejemplo n.º 3
0
    def getCategories(self,
                      categoryTypeID=None,
                      includeAdminOnlyCategories=None):
        '''getCategories
        Returns an XML payload containing a full listing of all category data. Category data consists primarily
        of the category name and sub-categories.
        Sample Request URL: http://.../?do=cnt.getservice&service=getCategories
        
        Parameter Options:
        :param categoryTypeID: Integer valid values: 1= Event, 2=Exhibitor & 3=Abstract If
        not provided the system defaults to sending Event categories.
        :param includeAdminOnlyCategories: 0 or 1 (represents true or false).
        '''
        url = "%s/?do=cnt.getservice&service=getCategories" % (self.api.base)

        args = {
            "categoryTypeID": categoryTypeID,
            "includeAdminOnlyCategories": includeAdminOnlyCategories
        }

        result = self.get_result(url, args)
        if "categories" in result:
            if "category" in result['categories']:
                result = result["categories"]["category"]
                print(("Found %s categories!" % (len(result))))
        return ordered_to_dict(result)
Ejemplo n.º 4
0
    def getPersonActivities(self,attendeeID,lastNameInitialStart=None,lastNameInitialEnd=None):
        '''getPersonActivities
        Returns an XML payload containing the results of the attendee get activity method. The 'stat' attribute
        is used to indicate the success or failure of the request. Extended description of all options are listed
        below.
        Sample Request URL: http://.../?do=cnt.getservice&service=getPersonActivities&[Parameter List]
        
        Parameter Options:
        :param attendeeID: Numeric value; Identifies the attendee record to retrieve.
        :param lastNameInitialStart: 1 character used to indicate the starting initial of the last name range to include.
        E.g. A
        :param lastNameInitialEnd: 1 character used to indicate the starting initial of the last name range to include.
        If the 'lastNameInitialStart' is provided but no 'lastNameInitialEnd' is provided the system uses the
        'lastNameInitialStart' as the 'lastNameInitialEnd'. E.g. B
        '''
        url = "%s/?do=cnt.getservice&service=getPersonActivities" %(self.api.base)
 
        # Initials should probably always be uppercase
        if lastNameInitialStart != None:
            lastNameInitialStart = capitalize(lastNameInitialStart)
        if lastNameInitialEnd != None:
            lastNameInitialEnd = capitalize(lastNameInitialEnd)

        args = {"attendeeID":attendeeID,
                "lastNameInitialStart":lastNameInitialStart,
                "lastNameInitialEnd":lastNameInitialEnd}   

        result = self.get_result(url,args)
        # Note to developer - did not test this call
        return ordered_to_dict(result)
Ejemplo n.º 5
0
Archivo: events.py Proyecto: vsoch/ohbm
 def getEventSearchOptions(self):
     '''getEventSearchOptions returns an XML payload containing search options for the getSearchResults service. The  
     results of this call are used to obtain valid search values which can be passed to the 'getSearchResults' request.
     Sample Request URL: http://.../?do=cnt.getservice&service=getEventSearchOptions
     '''
     url = "%s/?do=cnt.getservice&service=getEventSearchOptions" %(self.api.base)
     result = self.get_result(url)
     return ordered_to_dict(result)
Ejemplo n.º 6
0
Archivo: events.py Proyecto: satra/ohbm
 def getEventSearchOptions(self):
     '''getEventSearchOptions returns an XML payload containing search options for the getSearchResults service. The  
     results of this call are used to obtain valid search values which can be passed to the 'getSearchResults' request.
     Sample Request URL: http://.../?do=cnt.getservice&service=getEventSearchOptions
     '''
     url = "%s/?do=cnt.getservice&service=getEventSearchOptions" % (
         self.api.base)
     result = self.get_result(url)
     return ordered_to_dict(result)
Ejemplo n.º 7
0
    def getAttendeesCreditActivity(self,
                                   attendeeID=None,
                                   attendeesID=None,
                                   memberNumber=None,
                                   memberNumberPartial=None,
                                   lastNameInitialStart=None,
                                   lastNameInitialEnd=None,
                                   plannerID=None,
                                   claimedOnAfter=None,
                                   claimedOnBefore=None):
        '''getAttendeesCreditActivity
        Returns an XML payload containing and attendee(s) data and credit activity grouped by
        planner/activity. Credit activities consist of the claimed activities, the activities' displayed credit, the
        activities' credit types/accreditation bodies (based on the attendee's registration type), and the credit
        awarded for each credit type/accreditation body.
        Sample Request URL: http://.../?do=cnt.getservice&service=getAttendeesCreditActivity&[Parameter
        List]

        Parameter Options:        
        :param attendeeID: Numeric value; Identifies the attendee record to retrieve.
        :param attendeesID: List of numeric values; Identifies attendee records to retrieve.
        :param memberNumber: String value. Identifies the attendee record to retrieve.
        :param memberNumberPartial: String value. Partial member number used to search/identify attendee
        records to retrieve.
        :param lastNameInitialStart: 1 character used to indicate the starting initial of the last name range to include.
        E.g. A. Must be used with lastNameInitialEnd
        :param lastNameInitialEnd: 1 character used to indicate the starting initial of the last name range to include.
        E.g. B. Must be used with lastNameInitialStart
        :param plannerID: Numeric value; Used to filter the activities. Identifies the planner/activity to include.
        :param claimedOnAfter: Date; Used to filter the activities.
        :param claimedOnBefore: Date; Used to filter the activities
        '''
        url = "%s/?do=cnt.getservice&service=getAttendeesCreditActivity" % (
            self.api.base)

        # Initials should probably always be uppercase
        if lastNameInitialStart != None:
            lastNameInitialStart = capitalize(lastNameInitialStart)
        if lastNameInitialEnd != None:
            lastNameInitialEnd = capitalize(lastNameInitialEnd)

        args = {
            "attendeeID": attendeeID,
            "attendeesID": attendeesID,
            "memberNumber": memberNumber,
            "memberNumberPartial": memberNumberPartial,
            "plannerID": plannerID,
            "claimedOnAfter": claimedOnAfter,
            "claimedOnBefore": claimedOnBefore,
            "lastNameInitialStart": lastNameInitialStart,
            "lastNameInitialEnd": lastNameInitialEnd
        }

        result = self.get_result(url, args)
        # Note to developer - did not test this call
        return ordered_to_dict(result)
Ejemplo n.º 8
0
Archivo: system.py Proyecto: vsoch/ohbm
    def getForm(self,formID):
        '''getForm
        Returns an XML payload containing form data. Form data includes form settings, questions and
        answers.
        Sample Request URL: http://.../?do=cnt.getservice&service=getForm

        Parameter Options:
        :param *formID: Numeric value containing a valid form ID.
        '''
        url = "%s/?do=cnt.getservice&service=getForm" %(self.api.base)
        args = {"formID":formID}
        result = self.get_result(url,args)
        return ordered_to_dict(result)
Ejemplo n.º 9
0
    def getForm(self, formID):
        '''getForm
        Returns an XML payload containing form data. Form data includes form settings, questions and
        answers.
        Sample Request URL: http://.../?do=cnt.getservice&service=getForm

        Parameter Options:
        :param *formID: Numeric value containing a valid form ID.
        '''
        url = "%s/?do=cnt.getservice&service=getForm" % (self.api.base)
        args = {"formID": formID}
        result = self.get_result(url, args)
        return ordered_to_dict(result)
Ejemplo n.º 10
0
    def getActivities(self,
                      plannerID=None,
                      activityID=None,
                      startsOn=None,
                      startsOnOrAfter=None,
                      startsOnOrBefore=None,
                      insertedOn=None,
                      insertedOnOrAfter=None,
                      insertedOnOrBefore=None):
        '''getActivities
        Returns an XML payload containing activity details. This payload includes the activity's title, codes,
        start/end dates, description, location, and ACCME PARS information. This payload also contains a
        listing of the activity's public role assignments.
        Sample Request URL: http://.../?do=cnt.getservice&service=getActivities

        Parameter Options:
        :param plannerID: Numeric identifier for a valid planner. Use this parameter to request the details of a single
        planner.
        :param activityID: Numeric identifier for a valid activity. Use this this parameter to request the details of a
        single activity.
        :param startsOn: Date value containing a valid date. Use this parameter to request the details of any activity
        that begins on this date.
        :param startsOnOrAfter: Date value containing a valid date. Use this parameter to request the details of any
        activity that begins on or after this date.
        :param startsOnOrBefore: Date value containing a valid date. Use this parameter to request the details of any
        activity that begins on or before this date.
        :param insertedOn: Date value containing a valid date. Use this parameter to request the details of any activity
        that was added to the system on this date.
        :param insertedOnOrAfter: Date value containing a valid date. Use this parameter to request the details of
        any activity that was added to the system on or after this date.
        :param insertedOnOrBefore: Date value containing a valid date. Use this parameter to request the details of
        any activity that was added to the system on or before this date.
        '''

        url = "%s/?do=cnt.getservice&service=getActivities" % (self.api.base)
        args = {
            "plannerID": plannerID,
            "activityID": activityID,
            "startsOn": startsOn,
            "startsOnOrAfter": startsOnOrAfter,
            "startsOnOrBefore": startsOnOrBefore,
            "insertedOn": insertedOn,
            "insertedOnOrAfter": insertedOnOrAfter,
            "insertedOnOrBefore": insertedOnOrBefore
        }

        result = self.get_result(url, args)
        # Note to developer - in testing, I would have assumed that a call without any args would return all
        # activities - the result was empty. This is either not developed, or a bug, so the result here is not
        # parse in any way.
        return ordered_to_dict(result)
Ejemplo n.º 11
0
 def getExhibitorSearchOptions(self):
     '''getExhibitorSearchOptions
     Returns an XML payload containing search options for the getExhibitorSearchResults service. The
     results of this call are used to obtain valid search values which can be passed to the
     'getExhibitorSearchResults' request.
     Sample Request URL: http://.../?do=cnt.getservice&service=getExhibitorSearchOptions
     Sample XML Payload: See REST_getExhibitorSearchOptions.xml
     '''
     url = "%s/?do=cnt.getservice&service=getExhibitorSearchOptions" %(self.api.base)
     result = self.get_result(url)
     # Note to developer - this call seems to return a structure that has "categories" - this
     # might be a bug in the base API
     # See https://github.com/vsoch/ohbm/issues/1
     return ordered_to_dict(result)
Ejemplo n.º 12
0
    def updateItinerary(self,
                        attendeeID,
                        itineraryID,
                        abstractID=None,
                        eventID=None,
                        exhibitorID=None,
                        Description=None,
                        startsOn=None,
                        endsOn=None):
        '''updateItinerary
        Returns an XML payload containing the results of the attendee itinerary data update. The 'stat'
        attribute is used to indicate the success or failure of the request. Extended description of all options are
        listed below.
        Sample Request URL: http://.../?do=cnt.getservice&service=updateItinerary&[Parameter List]

        Parameter Options:
        :param *attendeeID: Identifies the attendee record to update. Always required.
        :param *itineraryID: Identifies the itinerary record to update. Valid options: update, delete; The update option
        is assumed if no action is provided.
        :param abstractID: Identifies the abstract record being added, updated or removed
        :param eventID: Identifies the event record being added, updated or removed
        :param exhibitorID: Identifies the exhibitor record being added, updated or removed title. Title of the activity.
        Limit 300 characters. Required if record is not linked to an event, abstract or exhibitor. If linked to an
        event, abstract or exhibitor, title is ignored.
        :param Description: Description of the event. Limit 500 characters.
        :param startsOn: Date & Time of activity. Format: mm/dd/yyyy hh:mm tt, e.g. 05/01/2011 12:00 PM. Date /
        Time will be ignored if not a valid format or if passed with an event or abstract which already have a
        time associated.
        :param endsOn: Date & Time of activity. Format: mm/dd/yyyy hh:mm tt, e.g. 05/01/2011 12:00 PM. Date /
        Time will be ignored if not a valid format or if passed with an event or abstract which already have a
        time associated.
        '''
        url = "%s/?do=cnt.getservice&service=updateItinerary" % (self.api.base)

        args = {
            "attendeeID": attendeeID,
            "itineraryID": itineraryID,
            "abstractID": abstractID,
            "eventID": eventID,
            "exhibitorID": exhibitorID,
            "Description": Description,
            "startsOn": startsOn,
            "endsOn": endOn
        }

        result = self.get_result(url, args)
        # Note to developer - I didn't test this because I was nervous about changing itinerary. The response
        # should be tested, and a message to the user returned to verify/deny that the itinerary was changed.
        # It might make sense to have an argument that if True, returns the new itinerary
        return ordered_to_dict(result)
Ejemplo n.º 13
0
Archivo: system.py Proyecto: vsoch/ohbm
 def getMenu(self,menuID):
     '''getMenu
     Returns an XML payload containing a menu item and its content pages.
     Sample Request URL: http://.../?do=cnt.getservice&service=getMenu&[parameters list]
     
     Parameter Options:
     :param *menuID: Numeric value containing a valid menu id.
     '''
     url = "%s/?do=cnt.getservice&service=getMenu" %(self.api.base)
     args = {"menuID":menuID}
     result = self.get_result(url,args)
     # Note to developer - not tested, result is likely in some format like result['menus']['menu'] and
     # you could use parse_items(result,'menu')
     return ordered_to_dict(result)
Ejemplo n.º 14
0
    def getRoomsets(self, postFlag=None):
        '''getRoomSets
        Returns an XML payload containing a full listing of all Room Set data.
        Sample Request URL: http://.../?do=cnt.getservice&service=getRoomSets

        Parameter Options:
        :param postFlag: 0 or 1 (represents true or false).
        '''
        url = "%s/?do=cnt.getservice&service=getRoomSets" % (self.api.base)
        args = {"postFlag": postFlag}
        result = self.get_result(url, args)
        # Note to developer - testing this returned count of 0, if the data structure is equivalent
        # to result['roomSets']['roomSet'] then you can do parse_item(result,'roomSet')
        return ordered_to_dict(result)
Ejemplo n.º 15
0
    def getRoomsets(self,postFlag=None):
        '''getRoomSets
        Returns an XML payload containing a full listing of all Room Set data.
        Sample Request URL: http://.../?do=cnt.getservice&service=getRoomSets

        Parameter Options:
        :param postFlag: 0 or 1 (represents true or false).
        '''
        url = "%s/?do=cnt.getservice&service=getRoomSets" %(self.api.base)
        args = {"postFlag":postFlag}
        result = self.get_result(url,args)
        # Note to developer - testing this returned count of 0, if the data structure is equivalent
        # to result['roomSets']['roomSet'] then you can do parse_item(result,'roomSet')
        return ordered_to_dict(result)
Ejemplo n.º 16
0
 def getMenu(self, menuID):
     '''getMenu
     Returns an XML payload containing a menu item and its content pages.
     Sample Request URL: http://.../?do=cnt.getservice&service=getMenu&[parameters list]
     
     Parameter Options:
     :param *menuID: Numeric value containing a valid menu id.
     '''
     url = "%s/?do=cnt.getservice&service=getMenu" % (self.api.base)
     args = {"menuID": menuID}
     result = self.get_result(url, args)
     # Note to developer - not tested, result is likely in some format like result['menus']['menu'] and
     # you could use parse_items(result,'menu')
     return ordered_to_dict(result)
Ejemplo n.º 17
0
 def getExhibitorSearchOptions(self):
     '''getExhibitorSearchOptions
     Returns an XML payload containing search options for the getExhibitorSearchResults service. The
     results of this call are used to obtain valid search values which can be passed to the
     'getExhibitorSearchResults' request.
     Sample Request URL: http://.../?do=cnt.getservice&service=getExhibitorSearchOptions
     Sample XML Payload: See REST_getExhibitorSearchOptions.xml
     '''
     url = "%s/?do=cnt.getservice&service=getExhibitorSearchOptions" %(self.api.base)
     result = self.get_result(url)
     # Note to developer - this call seems to return a structure that has "categories" - this
     # might be a bug in the base API
     # See https://github.com/vsoch/ohbm/issues/1
     return ordered_to_dict(result)
Ejemplo n.º 18
0
    def authenticateBase(self, url, username, password):
        '''a general function for authenticating, and returning result
        :param *url: the URL to send the request to
        :param *username: the username
        :param *password: the password
        '''
        args = {"username": username, "password": password}

        result = self.get_result(url, args)
        if 'authentication' in result:
            result = result['authentication']
            if "@result" in result:
                print(("Credentials are %s" % (result['@result'])))

        return ordered_to_dict(result)
Ejemplo n.º 19
0
Archivo: auth.py Proyecto: vsoch/ohbm
    def authenticateBase(self,url,username,password):
        '''a general function for authenticating, and returning result
        :param *url: the URL to send the request to
        :param *username: the username
        :param *password: the password
        '''
        args = {"username":username,
                "password":password}

        result = self.get_result(url,args)
        if 'authentication' in result:
            result = result['authentication']
            if "@result" in result:
                print("Credentials are %s" %(result['@result']))
    
        return ordered_to_dict(result)
Ejemplo n.º 20
0
 def getRoomset(self, roomSetID):
     '''getRoomSet
     Returns an XML payload containing a full listing of one Room Set. Room Set data consists primarily
     of Room, Location, Room Set Details (supplies), and Vendors. Note: The result set provides urls to the
     figures or documents which are actual files.
     Sample Request URL: http://.../?do=cnt.getservice&service=getRoomSet
     
     Parameter Options:
     :param *roomSetID: Numeric value of a Room Set.
     '''
     url = "%s/?do=cnt.getservice&service=getRoomSet" % (self.api.base)
     args = {"roomSetID": roomSetID}
     result = self.get_result(url, args)
     # Note to developer - couldn't test this either, data structure might be equivalent
     # with result in result['roomSet'], in which case you can do parse_item(result,'roomSet')
     return ordered_to_dict(result)
Ejemplo n.º 21
0
 def getRoomset(self,roomSetID):
     '''getRoomSet
     Returns an XML payload containing a full listing of one Room Set. Room Set data consists primarily
     of Room, Location, Room Set Details (supplies), and Vendors. Note: The result set provides urls to the
     figures or documents which are actual files.
     Sample Request URL: http://.../?do=cnt.getservice&service=getRoomSet
     
     Parameter Options:
     :param *roomSetID: Numeric value of a Room Set.
     '''
     url = "%s/?do=cnt.getservice&service=getRoomSet" %(self.api.base)
     args = {"roomSetID":roomSetID}
     result = self.get_result(url,args)
     # Note to developer - couldn't test this either, data structure might be equivalent
     # with result in result['roomSet'], in which case you can do parse_item(result,'roomSet')
     return ordered_to_dict(result)
Ejemplo n.º 22
0
    def getAttendeesCreditActivity(self,attendeeID=None,attendeesID=None,memberNumber=None,memberNumberPartial=None,
                                        lastNameInitialStart=None,lastNameInitialEnd=None,plannerID=None,
                                        claimedOnAfter=None,claimedOnBefore=None):
        '''getAttendeesCreditActivity
        Returns an XML payload containing and attendee(s) data and credit activity grouped by
        planner/activity. Credit activities consist of the claimed activities, the activities' displayed credit, the
        activities' credit types/accreditation bodies (based on the attendee's registration type), and the credit
        awarded for each credit type/accreditation body.
        Sample Request URL: http://.../?do=cnt.getservice&service=getAttendeesCreditActivity&[Parameter
        List]

        Parameter Options:        
        :param attendeeID: Numeric value; Identifies the attendee record to retrieve.
        :param attendeesID: List of numeric values; Identifies attendee records to retrieve.
        :param memberNumber: String value. Identifies the attendee record to retrieve.
        :param memberNumberPartial: String value. Partial member number used to search/identify attendee
        records to retrieve.
        :param lastNameInitialStart: 1 character used to indicate the starting initial of the last name range to include.
        E.g. A. Must be used with lastNameInitialEnd
        :param lastNameInitialEnd: 1 character used to indicate the starting initial of the last name range to include.
        E.g. B. Must be used with lastNameInitialStart
        :param plannerID: Numeric value; Used to filter the activities. Identifies the planner/activity to include.
        :param claimedOnAfter: Date; Used to filter the activities.
        :param claimedOnBefore: Date; Used to filter the activities
        '''
        url = "%s/?do=cnt.getservice&service=getAttendeesCreditActivity" %(self.api.base)
 
        # Initials should probably always be uppercase
        if lastNameInitialStart != None:
            lastNameInitialStart = capitalize(lastNameInitialStart)
        if lastNameInitialEnd != None:
            lastNameInitialEnd = capitalize(lastNameInitialEnd)

        args = {"attendeeID":attendeeID,
                "attendeesID":attendeesID,
                "memberNumber":memberNumber,
                "memberNumberPartial":memberNumberPartial,
                "plannerID":plannerID,
                "claimedOnAfter":claimedOnAfter,
                "claimedOnBefore":claimedOnBefore,
                "lastNameInitialStart":lastNameInitialStart,
                "lastNameInitialEnd":lastNameInitialEnd}   

        result = self.get_result(url,args)
        # Note to developer - did not test this call
        return ordered_to_dict(result)
Ejemplo n.º 23
0
    def getActivities(self,plannerID=None,activityID=None,startsOn=None,startsOnOrAfter=None,startsOnOrBefore=None,
                           insertedOn=None,insertedOnOrAfter=None,insertedOnOrBefore=None):
        '''getActivities
        Returns an XML payload containing activity details. This payload includes the activity's title, codes,
        start/end dates, description, location, and ACCME PARS information. This payload also contains a
        listing of the activity's public role assignments.
        Sample Request URL: http://.../?do=cnt.getservice&service=getActivities

        Parameter Options:
        :param plannerID: Numeric identifier for a valid planner. Use this parameter to request the details of a single
        planner.
        :param activityID: Numeric identifier for a valid activity. Use this this parameter to request the details of a
        single activity.
        :param startsOn: Date value containing a valid date. Use this parameter to request the details of any activity
        that begins on this date.
        :param startsOnOrAfter: Date value containing a valid date. Use this parameter to request the details of any
        activity that begins on or after this date.
        :param startsOnOrBefore: Date value containing a valid date. Use this parameter to request the details of any
        activity that begins on or before this date.
        :param insertedOn: Date value containing a valid date. Use this parameter to request the details of any activity
        that was added to the system on this date.
        :param insertedOnOrAfter: Date value containing a valid date. Use this parameter to request the details of
        any activity that was added to the system on or after this date.
        :param insertedOnOrBefore: Date value containing a valid date. Use this parameter to request the details of
        any activity that was added to the system on or before this date.
        '''

        url = "%s/?do=cnt.getservice&service=getActivities" %(self.api.base)
        args = {"plannerID":plannerID,
                "activityID":activityID,
                "startsOn":startsOn,
                "startsOnOrAfter":startsOnOrAfter,
                "startsOnOrBefore":startsOnOrBefore,
                "insertedOn":insertedOn, 
                "insertedOnOrAfter":insertedOnOrAfter,
                "insertedOnOrBefore":insertedOnOrBefore}

        result = self.get_result(url,args)
        # Note to developer - in testing, I would have assumed that a call without any args would return all
        # activities - the result was empty. This is either not developed, or a bug, so the result here is not 
        # parse in any way.
        return ordered_to_dict(result)
Ejemplo n.º 24
0
    def getActivity(self, plannerID, activityID):
        '''getActivity
        Returns an XML payload containing an activity's details. This payload includes the activity's title,
        codes, start/end dates, description, location, and ACCME PARS information. This payload also
        contains a listing of the activity's public role assignments and event (if the activity is one-to-one)
        Sample Request URL: http://.../?do=cnt.getservice&service=getActivity

        Parameter Options:
        :param *plannerID: Numeric identifier for a valid planner. Use this parameter to request the details of a single
        planner.
        :param *activityID: Numeric identifier for a valid activity. Use this this parameter to request the details of a
        single activity.
        '''
        url = "%s/?do=cnt.getservice&service=getActivity" % (self.api.base)

        args = {"plannerID": plannerID, "activityID": activityID}

        result = self.get_result(url, args)
        # Note to developer - same issue here, not sure about the format this will be returned in, so returning raw
        return ordered_to_dict(result)
Ejemplo n.º 25
0
    def updateItinerary(self,attendeeID,itineraryID,abstractID=None,eventID=None,exhibitorID=None,
                            Description=None,startsOn=None,endsOn=None):
        '''updateItinerary
        Returns an XML payload containing the results of the attendee itinerary data update. The 'stat'
        attribute is used to indicate the success or failure of the request. Extended description of all options are
        listed below.
        Sample Request URL: http://.../?do=cnt.getservice&service=updateItinerary&[Parameter List]

        Parameter Options:
        :param *attendeeID: Identifies the attendee record to update. Always required.
        :param *itineraryID: Identifies the itinerary record to update. Valid options: update, delete; The update option
        is assumed if no action is provided.
        :param abstractID: Identifies the abstract record being added, updated or removed
        :param eventID: Identifies the event record being added, updated or removed
        :param exhibitorID: Identifies the exhibitor record being added, updated or removed title. Title of the activity.
        Limit 300 characters. Required if record is not linked to an event, abstract or exhibitor. If linked to an
        event, abstract or exhibitor, title is ignored.
        :param Description: Description of the event. Limit 500 characters.
        :param startsOn: Date & Time of activity. Format: mm/dd/yyyy hh:mm tt, e.g. 05/01/2011 12:00 PM. Date /
        Time will be ignored if not a valid format or if passed with an event or abstract which already have a
        time associated.
        :param endsOn: Date & Time of activity. Format: mm/dd/yyyy hh:mm tt, e.g. 05/01/2011 12:00 PM. Date /
        Time will be ignored if not a valid format or if passed with an event or abstract which already have a
        time associated.
        '''
        url = "%s/?do=cnt.getservice&service=updateItinerary" %(self.api.base)

        args = {"attendeeID":attendeeID,
                "itineraryID":itineraryID,
                "abstractID":abstractID,
                "eventID":eventID,
                "exhibitorID":exhibitorID,
                "Description":Description,
                "startsOn":startsOn,
                "endsOn":endOn}
 
        result = self.get_result(url,args)
        # Note to developer - I didn't test this because I was nervous about changing itinerary. The response
        # should be tested, and a message to the user returned to verify/deny that the itinerary was changed.
        # It might make sense to have an argument that if True, returns the new itinerary
        return ordered_to_dict(result)
Ejemplo n.º 26
0
    def getActivity(self,plannerID,activityID):
        '''getActivity
        Returns an XML payload containing an activity's details. This payload includes the activity's title,
        codes, start/end dates, description, location, and ACCME PARS information. This payload also
        contains a listing of the activity's public role assignments and event (if the activity is one-to-one)
        Sample Request URL: http://.../?do=cnt.getservice&service=getActivity

        Parameter Options:
        :param *plannerID: Numeric identifier for a valid planner. Use this parameter to request the details of a single
        planner.
        :param *activityID: Numeric identifier for a valid activity. Use this this parameter to request the details of a
        single activity.
        '''
        url = "%s/?do=cnt.getservice&service=getActivity" %(self.api.base)

        args = {"plannerID":plannerID,
                "activityID":activityID}

        result = self.get_result(url,args)
        # Note to developer - same issue here, not sure about the format this will be returned in, so returning raw
        return ordered_to_dict(result)
Ejemplo n.º 27
0
    def getRoomSetSearchResults(self,
                                searchText=None,
                                locationID=None,
                                roomID=None,
                                startsOnDate=None,
                                code=None,
                                postFlag=None):
        '''getRoomSetSearchResults
        Returns an XML payload containing a Room Set listing. This data set returned is smaller than the
        getRoomSets request and intend for listing results. Use the result in combination with the getRoomSet
        call to pull addition information on a specific RoomSet.
        Sample Request URL: http://.../?do=cnt.getservice&service=getRoomSetSearchResults
        
        Request Parameters        
        :param searchText: Text string used to perform a general search of the Room Sets. Searches for matches in
        function name, code, location, and room. 
        :param locationID: Numeric value containing a valid locationID.
        Use the 'getRoomSetSearchOptions' call to obtain a valid list of locations
        :param roomID: Numeric value containing a valid roomID. Use the 'getRoomSetSearchOptions' call to obtain
        a valid list of rooms. 
        :param startsOnDate: Date value containing a valid date. Use the 'getSearchOptions'
        call to obtain a valid list of dates. 
        :param code: text value containing a valid code. Use the 'getSearchOptions' call to obtain the list of possible  
        Room Set Codes.
        :param postFlag: Boolean value (0 or 1).
        '''
        url = "%s/?do=cnt.getservice&service=getRoomSetSearchResults" % (
            self.api.base)

        args = {
            "searchText": searchText,
            "locationID": locationID,
            "roomID": roomID,
            "startsOnDate": startsOnDate,
            "code": code,
            "postFlag": postFlag
        }

        result = self.get_result(url, args)
        return ordered_to_dict(result)
Ejemplo n.º 28
0
    def addAttendeeActivity(self,
                            attendeeID,
                            registrationNumber=None,
                            eventIDs=None,
                            eventID=None):
        '''addAttendeeActivity
        Returns an XML payload containing the results of the attendee add activity method. The 'stat' attribute
        is used to indicate the success or failure of the request. Extended description of all options are listed
        below.
        Sample Request URL: http://.../?do=cnt.getservice&service=addAttendeeActivity&[Parameter List]
        
        Parameter Options:
        :param *attendeeID: Numeric value used to identify the attendee record to update. attendeeID or
        registrationNumber required.
        :param registrationNumber: String value used to identify the attendee record to update. attendeeID or
        registrationNumber required.
        :param eventIDs: Comma delimited list of event to be added to a person's activity list. eventIDs or eventID
        required
        :param eventID: Numeric value identifying an event to be added to a person's activity list. eventIDs or
        eventID required.
        '''

        if eventIDs == None and eventID == None:
            print("Either eventIDs or eventID must be specified!")
        else:
            url = "%s/?do=cnt.getservice&service=addAttendeeActivity" % (
                self.api.base)

            args = {
                "attendeeID": attendeeID,
                "registrationNumber": registrationNumber,
                "eventIDs": eventIDs,
                "eventID": eventID
            }

            result = self.get_result(url, args)
            # Note to developer - ditto above, I didn't test this. The response should be tested and
            # it might make sense to have an argument that if True, returns the new attendee activity
            return ordered_to_dict(result)
Ejemplo n.º 29
0
    def getCategories(self,categoryTypeID=None,includeAdminOnlyCategories=None):
        '''getCategories
        Returns an XML payload containing a full listing of all category data. Category data consists primarily
        of the category name and sub-categories.
        Sample Request URL: http://.../?do=cnt.getservice&service=getCategories
        
        Parameter Options:
        :param categoryTypeID: Integer valid values: 1= Event, 2=Exhibitor & 3=Abstract If
        not provided the system defaults to sending Event categories.
        :param includeAdminOnlyCategories: 0 or 1 (represents true or false).
        '''
        url = "%s/?do=cnt.getservice&service=getCategories" %(self.api.base)

        args = {"categoryTypeID":categoryTypeID,
                "includeAdminOnlyCategories":includeAdminOnlyCategories}

        result = self.get_result(url,args)
        if "categories" in result:
            if "category" in result['categories']:
                result = result["categories"]["category"]
                print("Found %s categories!" %(len(result)))
        return ordered_to_dict(result)
Ejemplo n.º 30
0
    def getExhibitorSearchResults(self,searchText=None,categoryID=None):
        '''getExhibitorSearchResults
        Returns an XML payload containing an exhibitor listing. This data set returned is smaller than the
        getExhibitors request and intend for listing results. Use the result in combination with the getExhibitor
        call to pull addition information on a specific event.
        Sample Request URL: http://.../?do=cnt.getservice&service=getExhibitorSearchResults

        Parameter Options:

        :param searchText: Text string used to perform a general search of the events. This parameter is used to find
        param matches in the title, description, objectives or speaker names.
        :param categoryID: Numeric value containing a valid category. Use the 'getSearchOptions' call to obtain a
        valid list of categories
        '''
        url = "%s/?do=cnt.getservice&service=getExhibitorSearchResults" %(self.api.base)

        args = {"searchText":searchText,
                "categoryID":categoryID}
        result = self.get_result(url,args)
        # Note to developer - I wasn't able to get any results for these queries, so I'm not sure what
        # they are supposed to look like. If the structure is result['exhibitors']['exhibitor'] then the parse_items
        # function could handle like parse_items(result,'exhibitor')
        return ordered_to_dict(result)
Ejemplo n.º 31
0
    def getExhibitorSearchResults(self,searchText=None,categoryID=None):
        '''getExhibitorSearchResults
        Returns an XML payload containing an exhibitor listing. This data set returned is smaller than the
        getExhibitors request and intend for listing results. Use the result in combination with the getExhibitor
        call to pull addition information on a specific event.
        Sample Request URL: http://.../?do=cnt.getservice&service=getExhibitorSearchResults

        Parameter Options:

        :param searchText: Text string used to perform a general search of the events. This parameter is used to find
        param matches in the title, description, objectives or speaker names.
        :param categoryID: Numeric value containing a valid category. Use the 'getSearchOptions' call to obtain a
        valid list of categories
        '''
        url = "%s/?do=cnt.getservice&service=getExhibitorSearchResults" %(self.api.base)

        args = {"searchText":searchText,
                "categoryID":categoryID}
        result = self.get_result(url,args)
        # Note to developer - I wasn't able to get any results for these queries, so I'm not sure what
        # they are supposed to look like. If the structure is result['exhibitors']['exhibitor'] then the parse_items
        # function could handle like parse_items(result,'exhibitor')
        return ordered_to_dict(result)
Ejemplo n.º 32
0
    def getPersonActivities(self,
                            attendeeID,
                            lastNameInitialStart=None,
                            lastNameInitialEnd=None):
        '''getPersonActivities
        Returns an XML payload containing the results of the attendee get activity method. The 'stat' attribute
        is used to indicate the success or failure of the request. Extended description of all options are listed
        below.
        Sample Request URL: http://.../?do=cnt.getservice&service=getPersonActivities&[Parameter List]
        
        Parameter Options:
        :param attendeeID: Numeric value; Identifies the attendee record to retrieve.
        :param lastNameInitialStart: 1 character used to indicate the starting initial of the last name range to include.
        E.g. A
        :param lastNameInitialEnd: 1 character used to indicate the starting initial of the last name range to include.
        If the 'lastNameInitialStart' is provided but no 'lastNameInitialEnd' is provided the system uses the
        'lastNameInitialStart' as the 'lastNameInitialEnd'. E.g. B
        '''
        url = "%s/?do=cnt.getservice&service=getPersonActivities" % (
            self.api.base)

        # Initials should probably always be uppercase
        if lastNameInitialStart != None:
            lastNameInitialStart = capitalize(lastNameInitialStart)
        if lastNameInitialEnd != None:
            lastNameInitialEnd = capitalize(lastNameInitialEnd)

        args = {
            "attendeeID": attendeeID,
            "lastNameInitialStart": lastNameInitialStart,
            "lastNameInitialEnd": lastNameInitialEnd
        }

        result = self.get_result(url, args)
        # Note to developer - did not test this call
        return ordered_to_dict(result)