# VimeoRuby 0.5.0 Welcome to VimeoRuby! ## Development Philosophy/Mindset The mindset of this project at this stage of development is to: 1. Be simple - Write boring code, resist pulling in additional gems as much as possible, and don't worry about edge cases or handling errors all that much right now. 2. Try to be as object-oriented as possible. I'm not an OO expert and you don't have to be either but let's try to improve our OO skills. 3. Have fun. Who wants another job? Not me so let's keep it light and make something cool! ## Installation Install the gem and add to the application's Gemfile by executing: $ bundle add vimeo_ruby If bundler is not being used to manage dependencies, install the gem by executing: $ gem install vimeo_ruby ## Usage ### Configure Credentials First, make sure you have a Vimeo account and have access to the following credentials from your Vimeo [My Apps dashboard](https://developer.vimeo.com/apps): `access_token` Once you have a valid `access_token`, assign it to the following environment variable: ```ruby VIMEO_ACCESS_TOKEN= ``` Now you should be ready to continue onward and experiment with this first iteration of the gem interface. Currently there are two main classes the you should use to interface with the Vimeo API through which are `VimeoRuby::User` and `VimeoRuby::Video`. ### Working with the VimeoRuby::User class For example, to get the currently authenticated user: ```ruby vimeo_user = VimeoRuby::User.get_user(access_token: ) # Makes http request to the Vimeo API #=> #) # Makes http request to the Vimeo API #=> # [:access_token, :additional_info, :available_for_hire, :available_for_hire?, :base_uri, :bio, :can_work_remotely, :can_work_remotely?, :location, :profile_link, :uploaded_videos, :video_collection, :vimeo_id] ``` We can then take the `vimeo_user` that we currently have stored and retrieve a collection of all of the users uploaded videos with the following: ```ruby uploaded_video_collection = vimeo_user.uploaded_videos # Makes http request to the Vimeo API only if the `vimeo_user.video_collection` value is nil or if query_params have been supplied. # => # [#) #=> #) # Makes http request to the Vimeo API #=> #