# Path: yak/rest_social_auth/backends/base.py
# class ExtraDataAbstractMixin(object, metaclass=abc.ABCMeta):
#     """
#     Ensure that backends define these methods. Used in pipeline to save extra data on the user model.
#     """
# 
#     @abc.abstractmethod
#     def save_extra_data(response, user):
#         return
# 
#     @abc.abstractmethod
#     def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
#         return
# 
# class ExtraActionsAbstractMixin(object, metaclass=abc.ABCMeta):
# 
#     @abc.abstractmethod
#     def post(user_social_auth, social_obj):
#         return
# 
#     @abc.abstractmethod
#     def get_friends(user_social_auth):
#         return


import requests
from social_core.backends.soundcloud import SoundcloudOAuth2
from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin


class Soundcloud(ExtraActionsAbstractMixin, ExtraDataAbstractMixin, SoundcloudOAuth2):
    @staticmethod
    def save_extra_data(response, user):
        if response['description']:
            user.about = response['description']

        user.save()

    @staticmethod
    def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
        return response['avatar_url']

    @staticmethod
    def post(user_social_auth, social_obj):
        return


# Path: yak/rest_social_auth/backends/base.py
# class ExtraDataAbstractMixin(object, metaclass=abc.ABCMeta):
#     """
#     Ensure that backends define these methods. Used in pipeline to save extra data on the user model.
#     """
# 
#     @abc.abstractmethod
#     def save_extra_data(response, user):
#         return
# 
#     @abc.abstractmethod
#     def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
#         return
# 
# class ExtraActionsAbstractMixin(object, metaclass=abc.ABCMeta):
# 
#     @abc.abstractmethod
#     def post(user_social_auth, social_obj):
#         return
# 
#     @abc.abstractmethod
#     def get_friends(user_social_auth):
#         return


# Path: yak/rest_social_auth/backends/yak_soundcloud.py
import requests
from social_core.backends.soundcloud import SoundcloudOAuth2
from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin



class Soundcloud(ExtraActionsAbstractMixin, ExtraDataAbstractMixin, SoundcloudOAuth2):
    @staticmethod
    def save_extra_data(response, user):
        if response['description']:
            user.about = response['description']

        user.save()

    @staticmethod
    def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
        return response['avatar_url']

    @staticmethod
    def post(user_social_auth, social_obj):
        return


    @staticmethod