Created
June 2, 2014 18:07
-
-
Save 8bitDesigner/5ce874349b4901595a06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| videos = new Videos() # Create a collection of videos | |
| videos.fetch() # Populate it with data from the server | |
| videos.upload() # Create a new video | |
| videos.fetchS3Credentials() # Possibly a private method? Applies to the resource as a whole | |
| videos.models # Array of Video model instances | |
| video = new Video(slug) # Create a new video instance for a specific video | |
| video.fetch() # Fetch the model's data from the server | |
| video.destroy() # Delete the model | |
| video.set({attrs: 'here'}) # Update the model's attributes | |
| video.save() # Save changes to the model |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh and
videos.models[0] instanceof Video