Esempio n. 1
0
 def get(self):
     """Get the users playlists, including private ones"""
     user = get_current_youtify_user_model()
     if user:
         json = get_playlist_overview_structs(user, True)
     else:
         json = []
     self.response.headers['Content-Type'] = 'application/json'
     self.response.out.write(simplejson.dumps(json))
Esempio n. 2
0
 def get(self):
     """Get the users playlists, including private ones"""
     user = get_current_youtify_user_model()
     if user:
         json = get_playlist_overview_structs(user, True)
     else:
         json = []
     self.response.headers['Content-Type'] = 'application/json'
     self.response.out.write(simplejson.dumps(json))
Esempio n. 3
0
    def get(self, id_or_nick):
        """Get playlists for user as JSON"""
        youtify_user_model = get_youtify_user_model_by_id_or_nick(id_or_nick)

        if youtify_user_model is None:
            self.error(404)
            return

        ret = get_playlist_overview_structs(youtify_user_model, False)

        self.response.headers['Content-Type'] = 'application/json'
        self.response.out.write(simplejson.dumps(ret))
Esempio n. 4
0
    def get(self, id_or_nick):
        """Get playlists for user as JSON"""
        youtify_user_model = get_youtify_user_model_by_id_or_nick(id_or_nick)

        if youtify_user_model is None:
            self.error(404)
            return

        ret = get_playlist_overview_structs(youtify_user_model, False)

        self.response.headers['Content-Type'] = 'application/json'
        self.response.out.write(simplejson.dumps(ret))