Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def post_event_unpublish(self, id, **data): return self.post("/events/{0}/unpublish/".format(id), data=data)
[ "\n POST /events/:id/unpublish/\n Unpublishes an event. In order for a free event to be unpublished, it must not have any pending or completed orders,\n even if the event is in the past. In order for a paid event to be unpublished, it must not have any pending or completed\n orders, unle...
Please provide a description of the function:def post_event_cancel(self, id, **data): return self.post("/events/{0}/cancel/".format(id), data=data)
[ "\n POST /events/:id/cancel/\n Cancels an event if it has not already been deleted. In order for cancel to be permitted, there must be no pending or\n completed orders. Returns a boolean indicating success or failure of the cancel.\n " ]
Please provide a description of the function:def delete_event(self, id, **data): return self.delete("/events/{0}/".format(id), data=data)
[ "\n DELETE /events/:id/\n Deletes an event if the delete is permitted. In order for a delete to be permitted, there must be no pending or\n completed orders. Returns a boolean indicating success or failure of the delete.\n " ]
Please provide a description of the function:def get_event_display_settings(self, id, **data): return self.get("/events/{0}/display_settings/".format(id), data=data)
[ "\n GET /events/:id/display_settings/\n Retrieves the display settings for an event.\n " ]
Please provide a description of the function:def post_event_display_settings(self, id, **data): return self.post("/events/{0}/display_settings/".format(id), data=data)
[ "\n POST /events/:id/display_settings/\n Updates the display settings for an event.\n " ]
Please provide a description of the function:def get_event_ticket_classes(self, id, **data): return self.get("/events/{0}/ticket_classes/".format(id), data=data)
[ "\n GET /events/:id/ticket_classes/\n Returns a :ref:`paginated <pagination>` response with a key of\n ``ticket_classes``, containing a list of :format:`ticket_class`.\n " ]
Please provide a description of the function:def post_event_ticket_classes(self, id, **data): return self.post("/events/{0}/ticket_classes/".format(id), data=data)
[ "\n POST /events/:id/ticket_classes/\n Creates a new ticket class, returning the result as a :format:`ticket_class`\n under the key ``ticket_class``.\n " ]
Please provide a description of the function:def get_event_ticket_class(self, id, ticket_class_id, **data): return self.get("/events/{0}/ticket_classes/{0}/".format(id,ticket_class_id), data=data)
[ "\n GET /events/:id/ticket_classes/:ticket_class_id/\n Gets and returns a single :format:`ticket_class` by ID, as the key\n ``ticket_class``.\n " ]
Please provide a description of the function:def post_event_ticket_class(self, id, ticket_class_id, **data): return self.post("/events/{0}/ticket_classes/{0}/".format(id,ticket_class_id), data=data)
[ "\n POST /events/:id/ticket_classes/:ticket_class_id/\n Updates an existing ticket class, returning the updated result as a :format:`ticket_class` under the key ``ticket_class``.\n " ]
Please provide a description of the function:def delete_event_ticket_class(self, id, ticket_class_id, **data): return self.delete("/events/{0}/ticket_classes/{0}/".format(id,ticket_class_id), data=data)
[ "\n DELETE /events/:id/ticket_classes/:ticket_class_id/\n Deletes the ticket class. Returns ``{\"deleted\": true}``.\n " ]
Please provide a description of the function:def get_event_canned_questions(self, id, **data): return self.get("/events/{0}/canned_questions/".format(id), data=data)
[ "\n GET /events/:id/canned_questions/\n This endpoint returns canned questions of a single event (examples: first name, last name, company, prefix, etc.). This endpoint will return :format:`question`.\n " ]
Please provide a description of the function:def get_event_questions(self, id, **data): return self.get("/events/{0}/questions/".format(id), data=data)
[ "\n GET /events/:id/questions/\n Eventbrite allows event organizers to add custom questions that attendees fill\n out upon registration. This endpoint can be helpful for determining what\n custom information is collected and available per event.\n This endpoint will return :format...
Please provide a description of the function:def get_event_question(self, id, question_id, **data): return self.get("/events/{0}/questions/{0}/".format(id,question_id), data=data)
[ "\n GET /events/:id/questions/:question_id/\n This endpoint will return :format:`question` for a specific question id.\n " ]
Please provide a description of the function:def get_event_attendees(self, id, **data): return self.get("/events/{0}/attendees/".format(id), data=data)
[ "\n GET /events/:id/attendees/\n Returns a :ref:`paginated <pagination>` response with a key of ``attendees``, containing a list of :format:`attendee`.\n " ]
Please provide a description of the function:def get_event_attendee(self, id, attendee_id, **data): return self.get("/events/{0}/attendees/{0}/".format(id,attendee_id), data=data)
[ "\n GET /events/:id/attendees/:attendee_id/\n Returns a single :format:`attendee` by ID, as the key ``attendee``.\n " ]
Please provide a description of the function:def get_event_orders(self, id, **data): return self.get("/events/{0}/orders/".format(id), data=data)
[ "\n GET /events/:id/orders/\n Returns a :ref:`paginated <pagination>` response with a key of ``orders``, containing a list of :format:`order` against this event.\n " ]
Please provide a description of the function:def get_event_discounts(self, id, **data): return self.get("/events/{0}/discounts/".format(id), data=data)
[ "\n GET /events/:id/discounts/\n Returns a :ref:`paginated <pagination>` response with a key of ``discounts``,\n containing a list of :format:`discounts <discount>` available on this event.\n field_error event_id NOT_FOUND\n The event id you are attempting to use does not exist.\n...
Please provide a description of the function:def post_event_discounts(self, id, **data): return self.post("/events/{0}/discounts/".format(id), data=data)
[ "\n POST /events/:id/discounts/\n Creates a new discount; returns the result as a :format:`discount` as the key ``discount``.\n " ]
Please provide a description of the function:def get_event_discount(self, id, discount_id, **data): return self.get("/events/{0}/discounts/{0}/".format(id,discount_id), data=data)
[ "\n GET /events/:id/discounts/:discount_id/\n Gets a :format:`discount` by ID as the key ``discount``.\n " ]
Please provide a description of the function:def post_event_discount(self, id, discount_id, **data): return self.post("/events/{0}/discounts/{0}/".format(id,discount_id), data=data)
[ "\n POST /events/:id/discounts/:discount_id/\n Updates a discount; returns the result as a :format:`discount` as the key ``discount``.\n " ]
Please provide a description of the function:def get_event_public_discounts(self, id, **data): return self.get("/events/{0}/public_discounts/".format(id), data=data)
[ "\n GET /events/:id/public_discounts/\n Returns a :ref:`paginated <pagination>` response with a key of ``discounts``, containing a list of public :format:`discounts <discount>` available on this event.\n Note that public discounts and discounts have exactly the same form and structure; they're ...
Please provide a description of the function:def post_event_public_discounts(self, id, **data): return self.post("/events/{0}/public_discounts/".format(id), data=data)
[ "\n POST /events/:id/public_discounts/\n Creates a new public discount; returns the result as a :format:`discount` as the key ``discount``.\n " ]
Please provide a description of the function:def get_event_public_discount(self, id, discount_id, **data): return self.get("/events/{0}/public_discounts/{0}/".format(id,discount_id), data=data)
[ "\n GET /events/:id/public_discounts/:discount_id/\n Gets a public :format:`discount` by ID as the key ``discount``.\n " ]
Please provide a description of the function:def post_event_public_discount(self, id, discount_id, **data): return self.post("/events/{0}/public_discounts/{0}/".format(id,discount_id), data=data)
[ "\n POST /events/:id/public_discounts/:discount_id/\n Updates a public discount; returns the result as a :format:`discount` as the key ``discount``.\n " ]
Please provide a description of the function:def delete_event_public_discount(self, id, discount_id, **data): return self.delete("/events/{0}/public_discounts/{0}/".format(id,discount_id), data=data)
[ "\n DELETE /events/:id/public_discounts/:discount_id/\n Deletes a public discount.\n " ]
Please provide a description of the function:def get_event_access_codes(self, id, **data): return self.get("/events/{0}/access_codes/".format(id), data=data)
[ "\n GET /events/:id/access_codes/\n Returns a :ref:`paginated <pagination>` response with a key of ``access_codes``, containing a list of :format:`access_codes <access_code>` available on this event.\n " ]
Please provide a description of the function:def post_event_access_codes(self, id, **data): return self.post("/events/{0}/access_codes/".format(id), data=data)
[ "\n POST /events/:id/access_codes/\n Creates a new access code; returns the result as a :format:`access_code` as the key ``access_code``.\n " ]
Please provide a description of the function:def get_event_access_code(self, id, access_code_id, **data): return self.get("/events/{0}/access_codes/{0}/".format(id,access_code_id), data=data)
[ "\n GET /events/:id/access_codes/:access_code_id/\n Gets a :format:`access_code` by ID as the key ``access_code``.\n " ]
Please provide a description of the function:def post_event_access_code(self, id, access_code_id, **data): return self.post("/events/{0}/access_codes/{0}/".format(id,access_code_id), data=data)
[ "\n POST /events/:id/access_codes/:access_code_id/\n Updates an access code; returns the result as a :format:`access_code` as the\n key ``access_code``.\n " ]
Please provide a description of the function:def get_event_transfers(self, id, **data): return self.get("/events/{0}/transfers/".format(id), data=data)
[ "\n GET /events/:id/transfers/\n Returns a list of :format:`transfers` for the event.\n " ]
Please provide a description of the function:def get_event_teams(self, id, **data): return self.get("/events/{0}/teams/".format(id), data=data)
[ "\n GET /events/:id/teams/\n Returns a list of :format:`teams` for the event.\n " ]
Please provide a description of the function:def get_event_team(self, id, team_id, **data): return self.get("/events/{0}/teams/{0}/".format(id,team_id), data=data)
[ "\n GET /events/:id/teams/:team_id/\n Returns information for a single :format:`teams`.\n " ]
Please provide a description of the function:def get_event_teams_attendees(self, id, team_id, **data): return self.get("/events/{0}/teams/{0}/attendees/".format(id,team_id), data=data)
[ "\n GET /events/:id/teams/:team_id/attendees/\n Returns :format:`attendees` for a single :format:`teams`.\n " ]
Please provide a description of the function:def get_one_series(self, id, **data): return self.get("/series/{0}/".format(id), data=data)
[ "\n GET /series/:id/\n Returns a repeating event series parent object for the specified repeating event series.\n .. _post-series-by-id:\n " ]
Please provide a description of the function:def post_one_series(self, id, **data): return self.post("/series/{0}/".format(id), data=data)
[ "\n POST /series/:id/\n Updates a repeating event series parent object, and optionally also creates more event dates or updates or deletes\n existing event dates in the series. In order for a series date to be deleted or updated, there must be no pending or\n completed orders for that da...
Please provide a description of the function:def post_series_publish(self, id, **data): return self.post("/series/{0}/publish/".format(id), data=data)
[ "\n POST /series/:id/publish/\n Publishes a repeating event series and all of its occurrences that are not already canceled or deleted. Once a date is cancelled it can still be uncancelled and can be viewed by the public. A deleted date cannot be undeleted and cannot by viewed by the public. In order ...
Please provide a description of the function:def post_series_unpublish(self, id, **data): return self.post("/series/{0}/unpublish/".format(id), data=data)
[ "\n POST /series/:id/unpublish/\n Unpublishes a repeating event series and all of its occurrences that are not already completed, canceled, or deleted. In\n order for a free series to be unpublished, it must not have any pending or completed orders for any dates, even past\n dates. In or...
Please provide a description of the function:def post_series_cancel(self, id, **data): return self.post("/series/{0}/cancel/".format(id), data=data)
[ "\n POST /series/:id/cancel/\n Cancels a repeating event series and all of its occurrences that are not already canceled or deleted. In order for\n cancel to be permitted, there must be no pending or completed orders for any dates in the series. Returns a boolean\n indicating success or ...
Please provide a description of the function:def delete_one_series(self, id, **data): return self.delete("/series/{0}/".format(id), data=data)
[ "\n DELETE /series/:id/\n Deletes a repeating event series and all of its occurrences if the delete is permitted. In order for a delete to be\n permitted, there must be no pending or completed orders for any dates in the series. Returns a boolean indicating\n success or failure of the de...
Please provide a description of the function:def get_series_events(self, id, **data): return self.get("/series/{0}/events/".format(id), data=data)
[ "\n GET /series/:id/events/\n Returns all of the events that belong to this repeating event series.\n .. _post-series-dates:\n " ]
Please provide a description of the function:def post_series_events(self, id, **data): return self.post("/series/{0}/events/".format(id), data=data)
[ "\n POST /series/:id/events/\n Creates more event dates or updates or deletes existing event dates in a repeating event series. In order for a series\n date to be deleted or updated, there must be no pending or completed orders for that date.\n " ]
Please provide a description of the function:def get_formats(self, id, **data): return self.get("/formats/{0}/".format(id), data=data)
[ "\n GET /formats/:id/\n Gets a :format:`format` by ID as ``format``. " ]
Please provide a description of the function:def get_media(self, id, **data): return self.get("/media/{0}/".format(id), data=data)
[ "\n GET /media/:id/\n Return an :format:`image` for a given id.\n " ]
Please provide a description of the function:def get_order(self, id, **data): return self.get("/orders/{0}/".format(id), data=data)
[ "\n GET /orders/:id/\n Gets an :format:`order` by ID as the key ``order``.\n " ]
Please provide a description of the function:def get_organizer(self, id, **data): return self.get("/organizers/{0}/".format(id), data=data)
[ "\n GET /organizers/:id/\n Gets an :format:`organizer` by ID as ``organizer``.\n " ]
Please provide a description of the function:def post_organizer(self, id, **data): return self.post("/organizers/{0}/".format(id), data=data)
[ "\n POST /organizers/:id/\n Updates an :format:`organizer` and returns it as as ``organizer``.\n field_error organizer.name DUPLICATE\n You already have another organizer with this name.\n field_error organizer.short_name UNAVAILABLE\n There is already another organizer or ...
Please provide a description of the function:def get_organizers_events(self, id, **data): return self.get("/organizers/{0}/events/".format(id), data=data)
[ "\n GET /organizers/:id/events/\n Gets events of the :format:`organizer`.\n " ]
Please provide a description of the function:def get_refund_request(self, id, **data): return self.get("/refund_requests/{0}/".format(id), data=data)
[ "\n GET /refund_requests/:id/\n Gets a :format:`refund-request` for the specified refund request.\n error NOT_AUTHORIZED\n Only the order's buyer can create a refund request\n error FIELD_UNKNOWN\n The refund request id provided is unknown\n " ]
Please provide a description of the function:def post_refund_request(self, id, **data): return self.post("/refund_requests/{0}/".format(id), data=data)
[ "\n POST /refund_requests/:id/\n Update a :format:`refund-request` for a specific order. Each element in items is a :format:`refund-item`\n error NOT_AUTHORIZED\n Only the order's buyer can create a refund request\n error FIELD_UNKNOWN\n The refund request id provided is un...
Please provide a description of the function:def get_tracking_beacon(self, tracking_beacons_id, **data): return self.get("/tracking_beacons/{0}/".format(tracking_beacons_id), data=data)
[ "\n GET /tracking_beacons/:tracking_beacons_id/\n Returns the :format:`tracking_beacon` with the specified :tracking_beacons_id.\n " ]
Please provide a description of the function:def post_tracking_beacon(self, tracking_beacons_id, **data): return self.post("/tracking_beacons/{0}/".format(tracking_beacons_id), data=data)
[ "\n POST /tracking_beacons/:tracking_beacons_id/\n Updates the :format:`tracking_beacons` with the specified :tracking_beacons_id. Though ``event_id`` and ``user_id`` are not individually required, it is a requirement to have a tracking beacon where either one must exist. Returns an :format:`tracking_...
Please provide a description of the function:def delete_tracking_beacon(self, tracking_beacons_id, **data): return self.delete("/tracking_beacons/{0}/".format(tracking_beacons_id), data=data)
[ "\n DELETE /tracking_beacons/:tracking_beacons_id/\n Delete the :format:`tracking_beacons` with the specified :tracking_beacons_id.\n " ]
Please provide a description of the function:def get_event_tracking_beacons(self, event_id, **data): return self.get("/events/{0}/tracking_beacons/".format(event_id), data=data)
[ "\n GET /events/:event_id/tracking_beacons/\n Returns the list of :format:`tracking_beacon` for the event :event_id\n " ]
Please provide a description of the function:def get_user_tracking_beacons(self, user_id, **data): return self.get("/users/{0}/tracking_beacons/".format(user_id), data=data)
[ "\n GET /users/:user_id/tracking_beacons/\n Returns the list of :format:`tracking_beacon` for the user :user_id\n " ]
Please provide a description of the function:def get_user(self, id, **data): return self.get("/users/{0}/".format(id), data=data)
[ "\n GET /users/:id/\n Returns a :format:`user` for the specified user as ``user``. If you want to get details about the currently authenticated user, use ``/users/me/``.\n " ]
Please provide a description of the function:def get_user_orders(self, id, **data): return self.get("/users/{0}/orders/".format(id), data=data)
[ "\n GET /users/:id/orders/\n Returns a :ref:`paginated <pagination>` response of :format:`orders <order>`, under the key ``orders``, of all orders the user has placed (i.e. where the user was the person buying the tickets).\n :param int id: The id assigned to a user.\n :param datetime ch...
Please provide a description of the function:def get_user_organizers(self, id, **data): return self.get("/users/{0}/organizers/".format(id), data=data)
[ "\n GET /users/:id/organizers/\n Returns a :ref:`paginated <pagination>` response of :format:`organizer` objects that are owned by the user.\n " ]
Please provide a description of the function:def get_user_owned_events(self, id, **data): return self.get("/users/{0}/owned_events/".format(id), data=data)
[ "\n GET /users/:id/owned_events/\n Returns a :ref:`paginated <pagination>` response of :format:`events <event>`, under\n the key ``events``, of all events the user owns (i.e. events they are organising)\n " ]
Please provide a description of the function:def get_user_events(self, id, **data): return self.get("/users/{0}/events/".format(id), data=data)
[ "\n GET /users/:id/events/\n Returns a :ref:`paginated <pagination>` response of :format:`events <event>`, under the key ``events``, of all events the user has access to\n " ]
Please provide a description of the function:def get_user_venues(self, id, **data): return self.get("/users/{0}/venues/".format(id), data=data)
[ "\n GET /users/:id/venues/\n Returns a paginated response of :format:`venue` objects that are owned by the user.\n " ]
Please provide a description of the function:def get_user_owned_event_attendees(self, id, **data): return self.get("/users/{0}/owned_event_attendees/".format(id), data=data)
[ "\n GET /users/:id/owned_event_attendees/\n Returns a :ref:`paginated <pagination>` response of :format:`attendees <attendee>`,\n under the key ``attendees``, of attendees visiting any of the events the user owns\n (events that would be returned from ``/users/:id/owned_events/``)\n ...
Please provide a description of the function:def get_user_owned_event_orders(self, id, **data): return self.get("/users/{0}/owned_event_orders/".format(id), data=data)
[ "\n GET /users/:id/owned_event_orders/\n Returns a :ref:`paginated <pagination>` response of :format:`orders <order>`,\n under the key ``orders``, of orders placed against any of the events the user owns\n (events that would be returned from ``/users/:id/owned_events/``)\n " ]
Please provide a description of the function:def get_user_contact_lists(self, id, **data): return self.get("/users/{0}/contact_lists/".format(id), data=data)
[ "\n GET /users/:id/contact_lists/\n Returns a list of :format:`contact_list` that the user owns as the key\n ``contact_lists``.\n " ]
Please provide a description of the function:def post_user_contact_lists(self, id, **data): return self.post("/users/{0}/contact_lists/".format(id), data=data)
[ "\n POST /users/:id/contact_lists/\n Makes a new :format:`contact_list` for the user and returns it as\n ``contact_list``.\n " ]
Please provide a description of the function:def get_user_contact_list(self, id, contact_list_id, **data): return self.get("/users/{0}/contact_lists/{0}/".format(id,contact_list_id), data=data)
[ "\n GET /users/:id/contact_lists/:contact_list_id/\n Gets a user's :format:`contact_list` by ID as ``contact_list``.\n " ]
Please provide a description of the function:def post_user_contact_list(self, id, contact_list_id, **data): return self.post("/users/{0}/contact_lists/{0}/".format(id,contact_list_id), data=data)
[ "\n POST /users/:id/contact_lists/:contact_list_id/\n Updates the :format:`contact_list` and returns it as ``contact_list``.\n " ]
Please provide a description of the function:def delete_user_contact_list(self, id, contact_list_id, **data): return self.delete("/users/{0}/contact_lists/{0}/".format(id,contact_list_id), data=data)
[ "\n DELETE /users/:id/contact_lists/:contact_list_id/\n Deletes the contact list. Returns ``{\"deleted\": true}``.\n " ]
Please provide a description of the function:def get_user_contact_lists_contacts(self, id, contact_list_id, **data): return self.get("/users/{0}/contact_lists/{0}/contacts/".format(id,contact_list_id), data=data)
[ "\n GET /users/:id/contact_lists/:contact_list_id/contacts/\n Returns the :format:`contacts <contact>` on the contact list\n as ``contacts``.\n " ]
Please provide a description of the function:def post_user_contact_lists_contacts(self, id, contact_list_id, **data): return self.post("/users/{0}/contact_lists/{0}/contacts/".format(id,contact_list_id), data=data)
[ "\n POST /users/:id/contact_lists/:contact_list_id/contacts/\n Adds a new contact to the contact list. Returns ``{\"created\": true}``.\n There is no way to update entries in the list; just delete the old one\n and add the updated version.\n " ]
Please provide a description of the function:def delete_user_contact_lists_contacts(self, id, contact_list_id, **data): return self.delete("/users/{0}/contact_lists/{0}/contacts/".format(id,contact_list_id), data=data)
[ "\n DELETE /users/:id/contact_lists/:contact_list_id/contacts/\n Deletes the specified contact from the contact list.\n Returns ``{\"deleted\": true}``.\n=======\n " ]
Please provide a description of the function:def get_user_bookmarks(self, id, **data): return self.get("/users/{0}/bookmarks/".format(id), data=data)
[ "\n GET /users/:id/bookmarks/\n Gets all the user's saved events.\n In order to update the saved events list, the user must unsave or save each event.\n A user is authorized to only see his/her saved events.\n " ]
Please provide a description of the function:def post_user_bookmarks_save(self, id, **data): return self.post("/users/{0}/bookmarks/save/".format(id), data=data)
[ "\n POST /users/:id/bookmarks/save/\n Adds a new bookmark for the user. Returns ``{\"created\": true}``.\n A user is only authorized to save his/her own events.\n " ]
Please provide a description of the function:def post_user_bookmarks_unsave(self, id, **data): return self.post("/users/{0}/bookmarks/unsave/".format(id), data=data)
[ "\n POST /users/:id/bookmarks/unsave/\n Removes the specified bookmark from the event for the user. Returns ``{\"deleted\": true}``.\n A user is only authorized to unsave his/her own events.\n error NOT_AUTHORIZED\n You are not authorized to unsave an event for this user.\n ...
Please provide a description of the function:def get_venue(self, id, **data): return self.get("/venues/{0}/".format(id), data=data)
[ "\n GET /venues/:id/\n Returns a :format:`venue` object.\n " ]
Please provide a description of the function:def post_venue(self, id, **data): return self.post("/venues/{0}/".format(id), data=data)
[ "\n POST /venues/:id/\n Updates a :format:`venue` and returns it as an object.\n " ]
Please provide a description of the function:def get_venues_events(self, id, **data): return self.get("/venues/{0}/events/".format(id), data=data)
[ "\n GET /venues/:id/events/\n Returns events of a given :format:`venue`.\n " ]
Please provide a description of the function:def get_webhook(self, id, **data): return self.get("/webhooks/{0}/".format(id), data=data)
[ "\n GET /webhooks/:id/\n Returns a :format:`webhook` for the specified webhook as ``webhook``.\n " ]
Please provide a description of the function:def delete_webhook(self, id, **data): return self.delete("/webhooks/{0}/".format(id), data=data)
[ "\n DELETE /webhooks/:id/\n Deletes the specified :format:`webhook` object.\n " ]
Please provide a description of the function:def get_user(self, user_id=None): if user_id: return self.get('/users/{0}/'.format(user_id)) return self.get('/users/me/')
[ "\n Returns a user for the specified user as user.\n\n GET users/:id/\n\n :param int user_id: (optional) The id assigned to a user\n\n " ]
Please provide a description of the function:def get_user_orders(self, user_id=None, changed_since=None): if user_id: url = '/users/{0}/orders/'.format(user_id) else: url = '/users/me/orders/' data = {} if changed_since: data['changed_since']...
[ "\n Returns a paginated response of orders, under the key orders, of all\n orders the user has placed (i.e. where the user was the person buying\n the tickets).\n\n GET users/:id/orders/\n\n :param int user_id: (optional) The id assigned to a user. Leave empty\n to get ...
Please provide a description of the function:def get_event_attendees(self, event_id, status=None, changed_since=None): data = {} if status: # TODO - check the types of valid status data['status'] = status if changed_since: data['changed_since'] = changed_since ...
[ "\n Returns a paginated response with a key of attendees, containing a\n list of attendee.\n\n GET /events/:id/attendees/\n " ]
Please provide a description of the function:def post_event_discount( self, event_id, discount_code, discount_amount_off=None, discount_percent_off=None, discount_ticket_ids=None, discount_quantity_available=None, discount_start_date=No...
[ "\n POST /events/:id/discounts/\n\n discount_code string required Code to activate discount\n discount_amount_off unknown optional Fixed reduction amount\n discount_percent_off string optional Percentage reduction\n discou...
Please provide a description of the function:def webhook_to_object(self, webhook): if isinstance(webhook, string_type): # If still JSON, convert to a Python dict webhook = json.dumps(webhook) # if a flask.Request object, try to convert that to a webhook if not i...
[ "\n Converts JSON sent by an Eventbrite Webhook to the appropriate\n Eventbrite object.\n\n # TODO - Add capability to handle Django request objects\n " ]
Please provide a description of the function:def get_params_from_page(path, file_name, method_count): # open the rendered file. file_name = file_name.replace(".rst", "") file_path = "{0}/../_build/html/endpoints/{1}/index.html".format( path, file_name) soup = bs4.BeautifulSoup(open(file_pat...
[ " This function accesses the rendered content.\n We must do this because how the params are not defined in the docs,\n but rather the rendered HTML\n " ]
Please provide a description of the function:def is_valid_ip(ip_address): valid = True try: socket.inet_aton(ip_address.strip()) except: valid = False return valid
[ "\n Check Validity of an IP address\n " ]
Please provide a description of the function:def get_ip_address_from_request(request): PRIVATE_IPS_PREFIX = ('10.', '172.', '192.', '127.') ip_address = '' x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR', '') if x_forwarded_for and ',' not in x_forwarded_for: if not x_forwarded_fo...
[ "\n Makes the best attempt to get the client's real IP or return the loopback\n " ]
Please provide a description of the function:def process_request(self, request): # Section adjusted to restrict login to ?edit # (sing cms-toolbar-login)into DjangoCMS login. restricted_request_uri = request.path.startswith( reverse('admin:index') or "cms-toolbar-login" in r...
[ "\n Check if the request is made form an allowed IP\n " ]
Please provide a description of the function:def get_settings(editor_override=None): flavor = getattr(settings, "DJANGO_WYSIWYG_FLAVOR", "yui") if editor_override is not None: flavor = editor_override return { "DJANGO_WYSIWYG_MEDIA_URL": getattr(settings, "DJANGO_WYSIWYG_MEDIA_URL", u...
[ "Utility function to retrieve settings.py values with defaults" ]
Please provide a description of the function:def wysiwyg_setup(protocol="http", editor_override=None): ctx = { "protocol": protocol, } ctx.update(get_settings(editor_override=editor_override)) return render_to_string( "django_wysiwyg/%s/includes.html" % ctx['DJANGO_WYSIWYG_FLAVOR'...
[ "\n Create the <style> and <script> tags needed to initialize the rich text editor.\n\n Create a local django_wysiwyg/includes.html template if you don't want to use Yahoo's CDN\n " ]
Please provide a description of the function:def wysiwyg_editor(field_id, editor_name=None, config=None, editor_override=None): if not editor_name: editor_name = "%s_editor" % field_id ctx = { 'field_id': field_id, 'editor_name': editor_name, 'config': config } ...
[ "\n Turn the textarea #field_id into a rich editor. If you do not specify the\n JavaScript name of the editor, it will be derived from the field_id.\n\n If you don't specify the editor_name then you'll have a JavaScript object\n named \"<field_id>_editor\" in the global namespace. We give you control of...
Please provide a description of the function:def wysiwyg_static_url(appname, prefix, default_path): if appname in settings.INSTALLED_APPS: return urljoin(settings.STATIC_URL, prefix) else: return default_path
[ "\n Automatically use an prefix if a given application is installed.\n For example, if django-ckeditor is installed, use it's STATIC_URL/ckeditor folder to find the CKEditor distribution.\n When the application does not available, fallback to the default path.\n\n This is a function for the internal tem...
Please provide a description of the function:def clean_html5lib(input): from html5lib import treebuilders, treewalkers, serializer, sanitizer p = html5lib.HTMLParser(tree=treebuilders.getTreeBuilder("dom")) dom_tree = p.parseFragment(input) walker = treewalkers.getTreeWalker("dom") stream = wa...
[ "\n Takes an HTML fragment and processes it using html5lib to ensure that the HTML is well-formed.\n\n >>> clean_html5lib(\"<p>Foo<b>bar</b></p>\")\n u'<p>Foo<b>bar</b></p>'\n >>> clean_html5lib(\"<p>Foo<b>bar</b><i>Ooops!</p>\")\n u'<p>Foo<b>bar</b><i>Ooops!</i></p>'\n >>> clean_html5lib('<p>Foo<...
Please provide a description of the function:def as_sql(self, qn, connection=None): if self.bit: return ("(%s.%s | %d)" % (qn(self.table_alias), qn(self.column), self.bit.mask), []) return ("(%s.%s & %d)" % (qn(self.table_alias), qn(self.column), self.bit.mask), ...
[ "\n Create the proper SQL fragment. This inserts something like\n \"(T0.flags & value) != 0\".\n\n This will be called by Where.as_sql()\n " ]
Please provide a description of the function:def as_sql(self, qn, connection): engine = connection.settings_dict['ENGINE'].rsplit('.', -1)[-1] if engine.startswith('postgres'): XOR_OPERATOR = '#' elif engine.startswith('sqlite'): raise NotImplementedError ...
[ "\n Create the proper SQL fragment. This inserts something like\n \"(T0.flags & value) != 0\".\n\n This will be called by Where.as_sql()\n " ]
Please provide a description of the function:def get_auth(self): ''' Returns username from the configfile. ''' return (self._cfgparse.get(self._section, 'username'), self._cfgparse.get(self._section, 'password'))
[]
Please provide a description of the function:def connect(config_file=qcs.default_filename, section='info', remember_me=False, remember_me_always=False): # Retrieve login credentials. conf = qcconf.QualysConnectConfig(filename=config_file, section=section, remember_me=remember_me, ...
[ " Return a QGAPIConnect object for v1 API pulling settings from config\n file.\n " ]
Please provide a description of the function:def format_api_version(self, api_version): # Convert to int. if type(api_version) == str: api_version = api_version.lower() if api_version[0] == 'v' and api_version[1].isdigit(): # Remove first 'v' in case the ...
[ " Return QualysGuard API version for api_version specified.\n\n " ]
Please provide a description of the function:def which_api_version(self, api_call): # Leverage patterns of calls to API methods. if api_call.endswith('.php'): # API v1. return 1 elif api_call.startswith('api/2.0/'): # API v2. return 2 ...
[ " Return QualysGuard API version for api_call specified.\n\n " ]
Please provide a description of the function:def url_api_version(self, api_version): # Set base url depending on API version. if api_version == 1: # QualysGuard API v1 url. url = "https://%s/msp/" % (self.server,) elif api_version == 2: # QualysGuard ...
[ " Return base API url string for the QualysGuard api_version and server.\n\n " ]
Please provide a description of the function:def format_http_method(self, api_version, api_call, data): # Define get methods for automatic http request methodology. # # All API v2 requests are POST methods. if api_version == 2: return 'post' elif api_version ...
[ " Return QualysGuard API http method, with POST preferred..\n\n " ]