How to use RSpotify in my Ruby on Rails application

I am developing a website with Ruby on Rails and facing some problems with API. I am creating a playlist based on user’s interest, where user can interact with it. I have heard of the usage of RSpotify that it can solve problems related to playlist. Can somebody explain usage of RSpotify with some basic and simple example? I know that it renders data in JSON format, but not properly aware of how is it helpful in my case. Also please explain how it validates a user’s account.
