Permalink
Browse files

add some comments to the events controller in preperation for a simpl…

…e api
  • Loading branch information...
1 parent 134bbd5 commit b44eebeb0512203cccaf68dae80be478c35d7a96 @cjstewart88 committed Jan 15, 2013
Showing with 42 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +41 −0 app/controllers/events_controller.rb
View
@@ -3,3 +3,4 @@ db/*.sqlite3
log/*.log
tmp/
.rvmrc
+config/initializers/api_keys.rb
@@ -1,3 +1,44 @@
+# Params to pass:
+#
+# {
+# api_key: string, required only IF submitting an event from outside the app
+# user_id: integer, REQUIRED must be the user_id of the person triggering the event
+# event: string, REQUIRED can be 'watchedVideo', 'just', 'similar', 'genre', 'dj', 'reddit', or 'customPlaylist'
+# query: string, required IF event IS 'just', 'similar', 'genre', 'dj', 'reddit', or 'customPlaylist'
+# playlist_name: string, required ony IF event IS 'customPlaylist'
+# playlist_owner: string, required ony IF event IS 'customPlaylist'
+# video_id: string, required ony IF event IS 'watchedVideo'
+# video_title: string required ony IF event IS 'watchedVideo'
+# }
+#
+# Examples of creating params
+#
+# Watched Video - Only report videos watched in full, meaning it reached the end of the video
+# {
+# event: 'watchedVideo',
+# video_id: 'jk39ke4j6c',
+# video_title: 'Band of Horses - Infinite Arms'
+# }
+#
+# Custom Playlist
+# {
+# event: 'customPlaylist',
+# playlist_name: 'Random Indie Jams',
+# playlist_owner: 'cody'
+# }
+#
+# Similar Search
+# {
+# event: 'similar',
+# query: 'My Morning Jacket'
+# }
+#
+# Reddit Search
+# {
+# event: 'reddit',
+# query: '/r/metal'
+# }
+
class EventsController < ApplicationController
before_filter :validate_current_user

0 comments on commit b44eebe

Please sign in to comment.