def publish_activities_to_path(self, url_path, activities): """Publish the provided activities to Gnip. @type url_path string @param url_path string The url path to publish activities to. @type activities list of Activity objects @param activities The activities to be published @return string containing response from the server This method allows a publisher to publish activities to the Gnip service. You can only publish activities to a publisher that you own. """ return self.__parse_response(self.__do_http_post(url_path, activities.to_xml()))
def publish_activities(self, publisher_name, activities): """Publish activities. @type publisher_name string @param publisher_name string The name of the publisher @type activities list of Activity objects @param activities The activities to publish @return string containing response from the server This method takes in a XML document with a list of activities and sends it to the Gnip server. """ url_path = "/my/publishers/" + publisher_name + "/activity.xml" return self.__parse_response(self.__do_http_post(url_path, activities.to_xml()))
def publish_activities(self, publisher_name, activities): """Publish the provided activities to Gnip. @type publisher_name string @param publisher_name string The name of the publisher to receive the activities. You must be the owner of the publisher. @type activities list of Activity objects @param activities The activities to be published @return string containing response from the server This method allows a publisher to publish activities to the Gnip service. You can only publish activities to a publisher that you own. """ url_path = "/my/publishers/" + publisher_name + "/activity.xml" return self.__parse_response(self.__do_http_post(url_path, activities.to_xml()))