Class: Localeui::Event
- Inherits:
-
Object
- Object
- Localeui::Event
- Defined in:
- lib/localeui/resources/event.rb
Class Method Summary collapse
Class Method Details
.create ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/localeui/resources/event.rb', line 5 def self.create raise NoProjectError, 'No project initialised' if Localeui.project_id.nil? || Localeui.project_id.empty? response = Localeui::Http.request( method: :post, endpoint: "projects/#{Localeui.project_id}/events" ) Localeui::Utils.logger.info "Event '#{response.body['api_id']}' was successfully created" response end |